MIAMI -

The murder trial of a man accused of killing a Miami police detective began Monday.

Andrew Rolle, now 26, is accused of fatally shooting 30-year-old James Walker Jr. Jan. 8, 2008.

Prosecutors contend Rolle fired gunshots at a rival gang member in North Miami Beach, then ran around the corner looking for a friend, driving the getaway car. He found the white Ford Taurus, only it was Detective Walker's unmarked police car, and he was in the driver's seat. When Rolle couldn't open the door, he allegedly opened fire on Walker.

Seven years later, Rolle is charged with first-degree murder and faces life in prison, if convicted.

Rolle's legal team says Rolle committed no crime and says he acted in self-defense. They argue that he had no idea that Walker was a police officer, and that the detective pointed a gun at their client "in a place he had a right to be."

Rolle is already serving a 20-year prison sentence for an armed robbery conviction in 2013 unrelated to this case.