A knife attack victim came within centimetres of death when he was stabbed in the chest during city centre violence.
The man had just left a nightclub when trouble flared which culminated in him being knifed "very close to the heart".
Newcastle Crown Court heard Omar Abdelbaryali was racially abused and attacked by known assailants during the trouble and had been "trying to retreat" from the incident when he lashed out.
Go here for the latest crime news and breaking North East police updates
The injured man had just left Independent nightclub in Sunderland with his girlfriend in the early hours of August 14 last year when an argument started, involving others, outside Abdelbaryali's nearby home.
Prosecutors accept the 21-year-old, who has never been in trouble before, caused the serious injury with an item he had picked up from the ground in "excessive self defence".
Abdelbaryali is the only person involved in the trouble that night to face prosecution.
Prosecutor Shaun Dryden said the injured man was taken to hospital with a single stab wound to his chest and his lung had to be drained.
Mr Dryden added: "A doctor notes the entry point was very close to the heart.
"There is evidence of a small amount of blood around the heart.
"Had this been two to three centimetres toward the mid-line of his chest, the result could have been fatal."
The court heard he still has an indentation in his chest and could face surgery to remove scar tissue.
He needed four weeks off work and was unable to sleep afterwards.
Abdelbaryali, of Steven Crescent, London, admitted unlawful wounding on the basis he used excessive self defence.
The court heard he has spent six months in custody on remand.
Recorder Jason Pitter QC sentenced him to 15 months imprisonment, suspended for 18 months, with 60 hours unpaid work.
The judge said the confrontation outside Abdelbaryali's home had turned into a physical fight and told him: "You were very quickly on the losing side of that fight, a fight in which others became involved and significant weapons were introduced and used against you.
"It is also clear at times you were trying to retreat from this incident.
"A disappointing and troubling aspect of the case is you were the victim of racial abuse during that and the prosecution have described at, at one point, an attack on you."
The judge added: "It is not irrelevant you are the only person to face any criminal sanction arising out of an incident in which the prosecution accept you have been the victim of racial abuse."
Christopher Knox, defending, said: "The defendant didn't go out looking for trouble.
"There was a racist element in the attack on him."