Two men who launched a "barbarous" attack on a soldier in a London street, holding his hair and hacking at his neck as they attempted to behead him, claimed they were inflicting "carnage" in retaliation for western oppression of Muslims, an Old Bailey jury heard on Friday.

Lee Rigby, 25, was killed near the Woolwich barracks in south-east London in May in an attack carried out by Michael Adebolajo and Michael Adebowale. They deny murder.

The jury saw new and graphic footage of the attack and its aftermath, as it was revealed that one of the assailants had produced a handwritten note justifying his actions which he passed to an onlooker.

In it Adebolajo tried to justify the attack as a strike against the west for alleged aggression against Muslims.

Prosecutors say that when paramedics arrived, Adebolajo told them: "Please let me lay here. I don't want anyone to die, I just want soldiers out of my country … Your government is all wrong, I did it for my God. I wish the bullets had killed me so I can join my friends and family."

Richard Whittam QC, prosecuting, said Adebolajo, 28, and Adebowale, 22, crashed a Vauxhall Tigra into Rigby from behind as he crossed the road, at a speed of 30-40mph. CCTV footage showed that Rigby, the father of a two-year-old son, was lifted on to the bonnet and hit the windscreen.

He was flung to the ground as the car hit a street sign, and was not seen to move again. Whittam said the two defendants, brandishing a cleaver and knives bought the day before, then got out of the car and Adebolajo, in the words of one witness, embarked on a "barbarous" attack.

"The driver was carrying a cleaver in his right hand. He knelt down by Lee Rigby and took hold of his hair. He then repeatedly hacked at the right side of his neck just below the jawline. He was using considerable force, bringing his hand into the air each time before he struck."

Another witness, the crown said, also saw that Adebolajo "held his head and deliberately sliced at the neck". The other man, Adebowale, "stabbing Lee Rigby to the body with some force".

The jury heard that more scenes of horror unfolded, with Adebolajo striking nine times at the soldier's neck. Onlookers screamed hysterically and shouted at the attackers to stop.

Another witness said he saw Adebolajo "sawing at the neck of Lee Rigby with a 'machete' and the other man trying to cut bits of the body by hacking away at it". Whittam said the witness described the attack as "being like a butcher attacking a joint of meat". The two men are then accused of dragging the body into the middle of the road, because "they wanted the members of the public present to see the consequences of their barbarous acts", Whittam said.

Rigby – a drummer and machine-gunner in the 2nd Battalion, the Royal Regiment of Fusiliers – had served in Helmand, Afghanistan. On the day he was killed he was travelling back from the Tower of London where he was helping army recruitment. Pictures held up in court showed he was wearing a Help for Heroes sweatshirt as he arrived at nearby Woolwich station, shortly after 2pm.

The jury and Rigby's family and friends watched on screens around the Old Bailey as graphic scenes were shown in court. At times it was too harrowing and some left the court.

The two defendants sat in the dock separated by security guards, just feet away from Rigby's family. Brown paper was taped over part of the dock where the defendants sat, so they were shielded from the view of the victim's relatives and friends.

Video was played of Adebolajo handing a letter to a woman after the attack. The court heard the handwritten note said that "carnage reaching your town" was "simply retaliation for your oppression in our towns". It continued: "Whereas the average Joe Bloggs working-class man loses his sons when they're killed by our brothers, when the heat of battle reaches your local street it's unlikely that any of your so-called politicians will be at risk or caught in crossfire so I suggest you remove them.

"Remove them and replace them with people who will secure your safety by immediate withdrawal from the affairs of Muslims."

The court heard that in a police interview after the attack Adebolajo is alleged to have said: "Your people have gone to Afghanistan and raped and killed our women. I am seeking retribution. I wouldn't stoop so low as to rape and kill women." He added: "I thank the person who shot me because it is what Allah would have wanted."

Whittam dismissed any notion that retaliation for any perceived wrongdoing was a defence morally or in law and pointed out that Rigby had been dressed in civilian clothes. The prosecutor told the court: "Killing to make a political point, or to frighten the public to put pressure on the government, or as an expression of anger, is murder and remains murder whether the government in question is a good one, a bad one or a dreadful one.

"Equally, there is no defence of moral justification for killing, just as there is no defence of religious justification. An eye for an eye and a tooth for a tooth suggests revenge or retaliation and, in the context of this case, murder."

The jury also saw footage which the crown said showed how close an armed officer who rushed to the scene came to being injured. As police arrived, Adebolajo came within feet of the female officer who realised too late that she could not get her gun out of a leg holster in time as she was sitting in the front seat of a car.

Adebolajo, the crown said while playing the video footage, raised a meat cleaver at the officer, and was stopped only by her colleague in the back seat of the car who opened fire, without time to aim properly. The shots propelled Adebolajo off his feet. His alleged accomplice, Adebowale, was pointing a gun at them and was also shot.

Both men are also charged with conspiring to murder and the attempted murder of police officers who arrived at the scene of the attack, which they deny.

The court was told the two accused had pleaded guilty to having a firearm with intent to cause fear of violence, and the crown allege the weapon was used to scare off members of the public as the accused waited for the police to arrive.

The trial continues.