A man nearly died after complaining about loud music in a hostel, the High Court in Edinburgh has heard.
Michael Muir, 28, needed surgery to stem the bleeding from stab wounds to his back, which had punctured a lung.
Sean Wilson, 21, was found guilty of assaulting Mr Muir to the danger of his life in Gorebridge, Midlothian on 3 December 2009.
Police found Mr Muir lying groaning in a street and Wilson trying to staunch the blood with a towel.
Pc Ross Young told the court he asked Wilson, of Gorebridge, if he knew who had attacked Mr Muir. Wilson replied: "It was me."
However, Wilson claimed that he attacked because Mr Muir had indecently assaulted a girl living in the hostel in Hunterfield Road.
Mr Muir described this allegation as "nonsense".
Wilson denied attempting to murder Mr Muir but a jury found him guilty of a reduced charge of assaulting Mr Muir to the danger of his life.
The jury told judge Michael O'Grady that they thought Wilson was acting under provocation.
Mr Muir, giving evidence, agreed he might have had a dart in his hand when he went to complain about the music blasting from the hostel room.
He said Wilson, a guest in the room, started giving him abuse.
"I had a bit of a shouting match with him," Mr Muir said.
"The next thing I realised there was a knife. I put my hands up to protect my face and felt a sharp sensation in the back - twice."
After the jury's majority verdict the court heard that Wilson had previous convictions for a serious assault, using a bottle as a weapon, and for "culpable and reckless conduct" involving a petrol bomb.
Judge O'Grady said Wilson's record caused him some concern and has called for background reports.
Wilson was remanded in custody pending sentence in Glasgow in September.