Amber Heard has claimed she punched Johnny Depp to stop him pushing her sister down the stairs after remembering a "rumour" he had done the same to Kate Moss.
The actress told the High Court in London that this "information" was "fresh in my mind" during the alleged incident in 2015, and she reacted "in a flash" to protect her sibling.
Ms Heard, 34, made the claim in her second day of giving evidence in her ex-husband's libel action against The Sun newspaper over a 2018 article which labelled him a "wife beater".
The actress has also rejected suggestions Tesla founder Elon Musk visited her while Mr Depp, 57, was away.
Eleanor Laws QC, representing Mr Depp, asked about the "stairs incident" in Los Angeles in March 2015 when Ms Heard has said she believed Mr Depp was going to push her sister, Whitney Henriquez, down the stairs.
The barrister said: "This was a very nasty row between you and Mr Depp and it was you who was the violent one."
Ms Heard replied: "Johnny hit both myself and my sister", before denying that she spat at the Pirates of the Caribbean star, or threw a can of Red Bull at him.
Ms Laws then put it to Ms Heard that she also "punched him (Mr Depp) in the face with a closed fist".
Ms Heard replied: "I did strike Johnny that day in defence of my sister.
"He was about to push her down the stairs and, the moment before that happened, I remembered information I had heard (that) he pushed a former girlfriend - I believe it was Kate Moss - down the stairs.
"I had heard this rumour from two people and it was fresh in my mind."
She added: "In a flash I reacted in defence of her."
Ms Heard went on to allege that Mr Depp had punched her "for years" and "for years I had never even hit him".
She said: "I never so much as landed a blow and I will never forget this incident ... it was the first time after all these years (I hit him)."
Ms Laws said Ms Heard had "changed your story" and had never mentioned the story about Ms Moss before.
She said Ms Heard "didn't mention a thing about Kate Moss being in your mind, you are just making this up as you go along".
Ms Laws played a clip from Ms Heard's 2016 deposition in Los Angeles, in which the actress talks about the alleged incident, and said that at no point in her "free narrative" did Ms Heard mention Ms Moss.
Ms Heard said: "No, I didn't have a chance."
She added: "I've not had the liberty of time or space or energy even to list every thought that crossed my mind."
Earlier, Ms Laws had read out text messages between Ms Heard and Mr Musk from May 2016, in which Ms Heard tells Mr Musk that she is going to obtain a restraining order against her then husband.
This is the day after an alleged incident at the Eastern Columbia Building in Los Angeles, where Mr Depp and Ms Heard lived, in which the actress claims Mr Depp threw her mobile phone at her, hitting her in the face - which the actor denies.
Questioning Ms Heard, Ms Laws said Mr Musk offers to "arrange 24/7 security for you", adding: "The offer would stand, even if you never wanted to see me again... anyway, sorry for being an idiot. The radio silence hurts a lot. It only matters because I really like you."
The barrister then referred to evidence given by Alejandro Romero, a concierge at the Eastern Columbia Building, who said he saw Mr Musk visiting Ms Heard "when Mr Depp was in Australia".
Ms Heard responded: "He's wrong. I wasn't even in communication with Elon until 2016."
In his written witness statement, Mr Romero said: "From March 2015 onwards, Ms Heard was visited regularly late at night, at around 11pm to midnight, by Mr Elon Musk."
Ms Heard is continuing to be questioned over 14 allegations of domestic violence, which the tabloid's publisher News Group Newspapers (NGN) relies on in its defence of an April 2018 article that called Mr Depp a "wife beater".
She has accused Mr Depp of verbal and physical abuse throughout their relationship, including screaming, swearing, punching, slapping, kicking, headbutting and choking her, as well as "extremely controlling and intimidating behaviour".
Mr Depp, however, says he was "not violent towards Ms Heard - it was she who was violent to him", and claims his ex-wife was "building a dossier" of false allegations as an "insurance policy for later".
The actor is suing NGN and The Sun's executive editor Dan Wootton over the publication of an article on 27 April, 2018 with the headline: "Gone Potty: How can JK Rowling be 'genuinely happy' casting wife beater Johnny Depp in the new Fantastic Beasts film?"
His lawyers say the article bore the meaning there was "overwhelming evidence" Mr Depp assaulted Ms Heard on a number of occasions and left her "in fear for her life".
NGN is defending the article as true, and says Mr Depp was "controlling and verbally and physically abusive towards Ms Heard, particularly when he was under the influence of alcohol and/or drugs".