This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A man found fatally shot at an Oceanside home was one of six people carrying out a home invasion robbery when a resident opened fire, police said.

Officers called to the home shortly after 1 a.m. Wednesday rendered aid to the 31-year-old man but he was pronounced dead at the scene, a police statement said.

Other officers stopped a vehicle leaving the area and detained other suspects, including a man with a gunshot wound. He was taken to a hospital where he was listed in stable condition.

Police said the resident’s gunfire struck the man who died but it was not yet known whether the wounded man was also shot by the resident or by one of the other suspects who was armed with a gun.