A man jointly accused of murder said his co-defendant told him to rob a drug dealer or become homeless.
Anis Anderson, 20, had been staying at the home of Carla Callum, 30, in London Colney, Hertfordshire, and said she demanded money towards its upkeep.
They are accused of luring Ahsanullah Nawazai, 20, to the house in Walsingham Way, and killing him.
He was found stabbed in November last year. Both defendants, on trial at St Albans Crown Court, deny murder.
The court heard Mr Anderson first met Ms Callum in early 2018, when he was homeless, and had lived with her from April that year.
Giving evidence, he said: "She was angry towards me because I wasn't providing. She told me I would no longer stay at the house. I couldn't really argue."
'All a blur'
Mr Anderson said that when Mr Nawazai, from Walthamstow, east London, pulled up outside the home, Ms Callum put a knife in his top pocket and told him to steal his drugs and money.
He told the jury Mr Nawazai punched him in the face a few times after he got into the passenger seat of his car and believed the knife fell from his pocket.
He said: "There was a push-and-pull struggle. I was trying to defend myself. It was all a blur.
"I was pushing him away. I didn't mean to stab him at all. Both of us were holding the knife."
Mr Nawazai was found wounded near a school at 19:15 GMT on 28 November, and later died in hospital.
A post-mortem examination found he had a number of injuries, including a fatal stab wound to the chest.
Earlier Ms Cullum described Mr Nawazai as a "nice guy" who would take her for a milkshake, and denied telling Mr Anderson to rob him.
The trial continues.