Michael Adebolajo is charged with brutally murdering soldier Lee Rigby (inset, on the day he was killed).Getty/AP

LONDON — Prosecutors showed jurors graphic videotape of the events surrounding the near decapitation of a British soldier on a London street, as the trial of two men opened Friday in the suspected Islamic extremist attack.

Michael Adebolajo, 28, and Michael Adebowale, 22, drove their car directly at Lee Rigby of the Royal Regiment of Fusiliers, lifting his body onto the hood and slamming it to the windshield, prosecutor Richard Whittam said.

A panel of 12 jurors was then shown security camera videos and images of the defendants dragging Rigby’s body from the sidewalk to the middle of the road. The pair did that so that everyone could see the impact of their “barbarous acts,” Whittam said.

“They both attacked the motionless body of Lee Rigby,” he said. “He was repeatedly stabbed and it appears it was Michael Adebolajo, the first defendant, who made a serious and almost successful attempt to decapitate Lee Rigby with multiple blows to his neck made with the meat cleaver.”

Gasps were first heard —and then silence — at London Central Criminal Court as the images played.

One video showed Adebolajo agitatedly talking to the camera and saying that his actions were revenge for British troops killing people abroad. The video, recorded by a passer-by on a mobile phone, showed the suspect’s bloodied hands holding a cleaver and a knife.

“An eye for an eye, and a tooth for a tooth,” he said repeatedly on the video. “The only reason we’ve killed this man today is because Muslims are dying daily by British soldiers.”

Videos also showed the two suspects rushing at a police car that arrived on the scene, before a dramatic shootout that ended with police subduing the two men.

The two suspects, who are both British citizens, have pleaded not guilty to murder charges, though jurors were told that both men have admitted possession of a firearm with intent to cause fear of violence. The defense will present its case later in the trial.

The two are also suspected of attempting to murder a police officer on the same day, and conspiracy to murder a police officer on or before May 22 — the day Rigby was attacked.

Both men sat quietly in the dock, intently watching the videos being presented as evidence and sometimes looking down. Adebolajo clutched a copy of the Quran as Whittam began.

The court was also shown videos recording the final movements of Rigby, 25, as he walked on the street wearing a sweatshirt for Help for Heroes, a charity devoted to injured servicemen and women.

Describing the aftermath of the attack, Whittam contrasted the scene marked by “heinous behavior” to the “bravery and decency” of members of the public who came upon it.

“One woman went to the lifeless body of Lee Rigby and stroked him to provide some comfort and humanity to what had unfolded. Others went to see if they could provide first aid,” Whittam said. “Another woman engaged Michael Adebolajo in conversation despite the fact that he was still holding the meat cleaver and his hands were covered in blood.”

The attack raised questions about whether Britain’s intelligence services could have done more to prevent Rigby’s killing, as both suspects had been known to them for some time from earlier inquiries.