ALAMEDA -- An alleged gang member who police say pointed a gun at a couple and tried to fire it during an attempted armed robbery near a dance studio was arrested Wednesday at his Oakland home.

Alejandro Mendoza, 27, had been wanted in connection with the Nov. 8 incident that took place near the 1400 block of Park Avenue in Alameda, said Alameda police Lt. Jill Ottaviano.

About midnight, a couple who had just left a dance studio saw a man with a gun and ran to their vehicle, police said. But the suspect approached them before they could close the vehicle's passenger-side door.

The suspect leaned into the vehicle and demanded items from them, police said. The suspect then pointed the gun at one of the victim's heads and began pulling the trigger. But the gun did not discharge, so police say the driver sped away, knocking the suspect to the ground.

Police arrived and officers checked the area for the suspect but did not find him. They later learned the suspect had just left a local business, La Pencha Azul, where police say he pulled out a semi-automatic pistol, pointed it at the ceiling and then pulled the trigger several times.

Due to a malfunction, Ottaviano said, the gun did not go off and no one was injured.

A subsequent investigation led detectives to Mendoza, who police say is a known gang member with a criminal history.

A judge issued a warrant for his arrest and at 9 a.m. on Wednesday police arrested him without incident at his Oakland home on suspicion of attempted armed robbery and criminal threats. Police said he remained jailed on Wednesday.

Contact Natalie Neysa Alund at 510-293-2469. Follow her at Twitter.com/nataliealund.