"Terrified" families eating at a McDonald's restaurant witnessed a fight in which a teenage boy was stabbed, a court has heard.
Rishawn Mohammed, 18, and two 17-year-old boys, deny violent disorder in connection with the attack on 13 June.
The boy who was stabbed and left with life-threatening injuries is one of the defendants.
At Ipswich Crown Court, Mr Mohammed also denied wounding with intent and having a bladed weapon.
The victim's main artery in his groin was severed with a 12cm (5in) kitchen knife, the court was told.
Neither of the teenagers can be named for legal reasons.
At the time of the attack, which took place at about 19:30 BST, the McDonald's in Ravenswood Avenue was full of families.
Opening the case, prosecutor Andrew Jackson described how a "violent fight terrified members of the public" and that Mr Mohammed pulled out a knife and "plunged" it into the victim.
A hospital doctor who treated the victim said "had it not been for prompt medical intervention he would almost certainly have died", Mr Jackson said.
The court heard that Mr Mohammed, of Hurricane Place, Ipswich, admitted in a statement to having the kitchen knife but claimed he was threatened and attacked by both the unnamed defendants in the McDonald's car park.
Mr Jackson said the fast food restaurant's CCTV did not capture the stabbing, but later that evening, police stopped a car and discovered a plastic bag with a bloodied Adidas T-shirt, jeans and the red kitchen knife used in the attack.
The blade was "extensively stained with blood", the prosecutor said.
The victim's DNA was found on the blade while Mr Mohammed's was on the handle, the court heard.
The trial is expected to last at least two weeks.