OAKLAND -- Murder charges have been added against a man already being prosecuted for attempted armed robbery after authorities linked the gun used in the holdup to a fatal West Oakland shooting last April, police said Thursday.

Police said Donnell McGilberry, 19, of Oakland, is now charged with killing Coty Luster, 18, on April 26 in the 1100 block of 34th Street. Officer Jason Andersen said the men knew each other, and the shooting resulted from a personal dispute.

McGilberry was already in custody, charged with attempted armed robbery and illegal gun possession for a Dec. 30 incident that was foiled when the intended victim took the gun from him and chased him down with the help of a friend who also had a gun, police said.

Police said a 24-year-old man was sitting in a car parked in the 2000 block of East 23rd Street waiting for a friend about 7:20 p.m. Dec. 30 when an armed McGilberry and two other men tried to rob him, Officer Omar Daza-Quiroz said.

The intended victim struggled with McGilberry and got the gun away from him while yelling for help, police said

A friend whom the intended victim was waiting for heard the screams, came outside with a gun and fired two shots into the air to scare theintruders, Daza-Quiroz said.

The victim and his friend ran after McGilberry. Officers in the area heard the gunfire, saw the men chasing McGilberry and stopped them all in the 1900 block of 21st Avenue.

McGilberry was arrested and the semi-automatic pistol the victim had grabbed was given to police.

Police said the gun was taken in a 2011 burglary. Andersen said McGilberry's name had come up in the Luster homicide investigation, but there was not enough evidence at the time to arrest him. After ballistics tests confirmed the gun link a few days ago, he was charged Wednesday, police said.

Police said Stanley Logwood, 24, of Oakland, was arrested and charged two weeks after the Dec. 30 robbery as an accessory and the third suspect is still being sought. Police said they think the men might be responsible for additional robberies.