BARSTOW — A 23-year-old man accused of breaking into an apartment to rob two men and firing a shot at them was behind bars on suspicion of attempted murder, authorities said.

Barstow Police Department officers arrested Christian Antonio Silva, who booking records list as a barber from Norwalk, on Sunday in the 600 block of East Virginia Way on suspicion of attempted murder and first degree robbery. Prosecutors on Tuesday charged Silva with felony counts of robbery and assault with a deadly weapon by means of force likely to cause great bodily harm. Court records show that both the charges have various enhancements, including committing robbery while armed with a firearm.

Officials said in a statement that Silva was linked to an armed robbery and a shooting that was reported at 4:09 a.m. that day. Officers learned that two Hispanic men attempted to rob the victims at gunpoint after forcing their way into the apartment.

One suspect held the victims at gunpoint while the other took their cellphones. At one point, one of the victims grabbed the gun and began struggling with the suspect for control of the gun, officials said. The victim eventually let go of the gun and both suspects left the apartment on foot.

The suspects reportedly fired a shot at the victims as they ran toward a vehicle a short distance away. They were unable to get the vehicle started, officials said, and eventually abandoned it to flee the scene on foot.

Officers were unable to find the suspects during an area check, but evidence was found to link the vehicle to the shooting incident. Detectives also located a subject who matched the physical description of one of the suspects, later identified as Silva.

Detectives contacted Silva and he was positively identified by both victims as being involved in the robbery and shooting, officials said.

Silva was being held at High Desert Detention Center in Adelanto in lieu of $1 million bail and is expected to be arraigned in a Victorville courtroom Wednesday afternoon, booking records show.

The second suspect is still at large. No description was provided Tuesday.

The investigation is ongoing and anyone with information is urged to contact Detective Leo Griego at 760-255-5187 or at the Barstow Police Department at 760-256-2211. Those wishing to remain anonymous can call the We-Tip Hotline at 1-800-782-7463 or online at www.wetip.com.