Murder accused Mohammed Rahman told jurors "I was fighting for my life" and "I thought I was going to die any second".
Rahman is accused of killing his on-off partner's former lover, Alan Stokoe, during what prosecutors allege was a knife fight outside the woman's home.
Giving evidence to jurors at Newcastle Crown Court, Rahman told how 26-year-old Mr Stokoe turned up in Laura McGee's street, in Chester-le-Street, County Durham, one night last July.
Rahman said he went out with a kitchen knife in case Mr Stokoe was there to "deter him and scare him off" and also so if the police turned up they would "have to take it seriously and would think what caused this man to pick up a knife".
Asked how he felt when he went out, he said: "I was scared, I was worried as well. I knew there was a chance I would be getting arrested at the same time.
"I just didn't want to be there. Anywhere but there at that time."
He said Miss McGee, the mother of his young child, had previously assured him Mr Stokoe had not been in touch and there had been no conflict, or he would not have gone there that night.
CCTV captures the moment Mr Stokoe appears and the two men come together.
Rahman said: "I just heard someone like 'aaaargggh' and running towards me, the next thing I knew he was in front of me. It was an aggressive charging noise."
Rahman said he told Mr Stokoe "Drop the knife or f*** off" but that "he didn't pause, he just carried on".
When his barrister suggested it looked like he had struck the first blow, he said: "I didn't want him getting anywhere close to me.
"I was showing him the knife I've got and backing off and he just kept pushing and pushing. I was trying to keep a safe distance.
"I was trying to move as fast as I could backwards, trying to make sure I didn't get stabbed. He was barging and driving into me."
Kirsty Brimelow QC, for Rahman, asked him: "Did you want to have a fight?" Rahman replied: "Absolutely not."
Miss Brimelow asked: "Were you trying to stab him?" Rahman said: "No." He added: "My intention was to keep that distance. If someone has got a sharp object in your face you are not going to go into it. I was backing off and swinging."
Rahman said he was shouting "give up", "stop it" and "you win".
He told jurors: "He was throwing me all over the place.
"I knew I had been stabbed. He had me in a headlock as well.
"I thought I was going to die any second. I thought any second he is going to put that knife through me.
"I was just thinking this is where I'm going to die and he is going to end up killing Laura as well."
He said when he moved towards Mr Stokoe his intention was to "keep him away from Laura in the house".
Miss Brimelow asked: "Did you want to get involved in a fight with him?"
Rahman replied: "No that would be insane. A knife fight? I know that's what the prosecution are trying to say - I arranged a knife fight. No."
Continuing his account of what happened, he said: "He had me in a headlock, dragging me down, I just needed to get out of that position because another blow would have killed me.
"I was down and he was on top, I was vulnerable, I knew he had that knife.
"I saw the knife come up and hit me on the chest.
"All I wanted to do was push him off me. That was not done in a conscious decision, it was done to get him off me.
"I would have been dead if I didn't do that. Then, no doubt, he would [have] gone and killed Laura as well."
Miss Brimelow reminds Rahman that the blow which killed Mr Stokoe went through four arteries in his neck and asked him how much force he used.
He replied: "I was fighting for my life.
"All I wanted to do was make that space between him and me. I needed to push him off me.
"I thought any second now this is it, it's done. I just wanted that gap."
Asked how he felt after striking what turned out to the fatal blow, Rahman said he was initially relieved to see the knife fall from his rival's hand and thought "Thank God that's over".
He added: "Then he just hit the floor. I just saw my whole world just shatter right in front of me."
Rahman said he went inside afterwards in case Mr Stokoe had brought anyone with him.
He said his head "was exploding" and he was "stressed and scared", adding: "I didn't know if that was a nightmare of if it was happening. I thought any second now I will wake up and be in my bed in London."
Rahman said he asked Laura to come out with him and have a look at Mr Stokoe, adding: "I didn't know what to do, my head was all over the place.
"When I got there, there was lots of blood coming out from his neck.
"I thought if I held onto it, the police are going to think I'm trying to strangle him."
Asked why he did not remain with him to apply first aid, he said: "I would not have known what to do".
He also said he was starting to lose breath and feel the pain from his stab wounds.
Rahman, 43, denies murder and conspiracy to pervert the course of justice.
The trial continues.