Two men forced their way into a North San Jose apartment and fatally shot a resident late Thursday, police said.

Officers responded to the 300 block of Elan Village Lane around 8:40 p.m. and came across a man, who had at least one gunshot wound. The victim was taken to an area hospital, police said, but did not survive.

A police sergeant on scene told NBC Bay Area that two men were inside an apartment when a pair of suspects burst inside. The crime may have begun as a home invasion and ended in a fatal shooting, he said.

It's unclear if the suspects stole anything before they fled. The second man in the apartment was unhurt and called 911, the sergeant said.

A neighbor said that the residents of that unit moved in only last week. He said he heard what may have been a cap gun, but didn't think any of it and so didn't call police.

Homicide and crime investigators from the San Jose Police Department are investigating a motive and circumstances leading up to the shooting.

No suspect information has been released so far. Police don't know if the man was targeted or the victim of a random crime.

The identity of the victim will be withheld until his next of kin have been informed of his death, according to police.

People with information about the case are asked to contact Detective Brian Meeker or Detective Sergeant Raul Martinez at 408-277-5283. Those who wish to remain anonymous can call Crime Stoppers at 408-947-7867.