A teen has been charged with capital murder in last week's deadly attempted robbery of a man who was shot while waiting for a ride to work in southwest Houston.

Elie Ngouelet, 18, is accused of fatally shooting Ramone Alviso Esquivel, 56, during the robbery on April 3.

Esquivel was waiting outside his apartment complex for his brother to pick him up for work around 5 a.m, just as a robber was believed to be burglarizing cars in the parking lot of the apartment complex in the 8400 block of South Course Drive, police said.

READ ALSO: Woman shot through window while children asleep in room

The gunman spotted Esquivel and tried robbing him. When Esquivel fought back, the attacker pulled out a gun and shot Esquivel twice, investigators said.

As Esquivel hit the ground, the attacker started rifling through his pockets as he lay dying, HPD Homicide Division Sgt. Hector Garcia said. Witnesses who heard the gunshots from inside their apartments rushed outside and scared away the gunman.

Esquivel died at the scene, Garcia said.

READ ALSO: Bartender charged in deadly DWI case surrenders

Police previously released a composite sketch and surveillance video to help identify the suspect.

Ngouelet turned himself in to investigators on Monday and confessed to shooting Esquivel, police said. His mother also identified him from the composite sketch, and a friend told police that Ngouelet said he killed someone in a robbery, a Harris County prosecutor said in a probable cause hearing.

He was charged Monday and is being held on no bond.

Jay Jordan contributed to this report.