The domestic violence case against 49ers linebacker Reuben Foster took a dramatic turn Thursday afternoon when Foster’s accuser, ex-girlfriend Elissa Ennis, said she fabricated the story she told authorities in February — of Foster hitting her and dragging her down stairs — as part of a “money scheme.”

Ennis explained her motives for going to police with an allegation of Foster’s attack while testifying at a pretrial hearing in San Jose — saying she wanted to “f–k up his career” after he tried to break up with her, according to The Athletic.

Ennis told responding officers in February that Foster had dragged her down the stairs by her hair, threw her out of the house, punched her in the head eight to 10 times and spit on her.

Ennis — who had begun recanting her original story within two days of relaying it, the district attorney confirmed in court, and formally did so through her attorney in late April — said on Thursday all those behaviors she described were lies.

“I wanted to sue Reuben,” Ennis said under oath. “It was a money scheme. It was all about money. I wanted to get him.”

“I really wanted to kill him,” she added. “I was so hurt.”

Ennis said she became visibly upset the morning Foster said he wanted to break up with her and that she chased after him with threats as he tried to run away from her.

“I told him I’m about to f–k yo s–t up, make sure you don’t have a job tomorrow,” she said, as reported by The Athletic.

Ennis said she made three 911 calls, two of which she hung up before getting an answer, and ultimately flagged down someone riding by to call the police on her behalf. The passerby who made the call reportedly testified that he remembered Ennis looking “very calm” and without injuries.

Ennis later admitted to falsely accusing a former boyfriend of assault in 2011, for which she said she went to jail, according to the website.

Ennis, 28, said she plans to enter a clinic to get help for herself once the case is closed.

“I don’t love him. I need help for myself,” she said in response to the DA asking her if she still has feelings for Foster.

Foster’s teammate, newly signed 49ers cornerback Richard Sherman, appeared to call out those who had criticized Foster in the wake of the allegations and before hearing the full story.

“Funny how people rush to judgment so quickly they can’t accept when the truth comes out so they sensationalize a lie and trivialize the truth,” Sherman wrote on Twitter shortly after Ennis’ testimony.

Foster, entering his second season with the 49ers after being selected in the first round of the 2017 draft, has not been allowed to participate in the team’s offseason program while the case is in progress. 49ers GM John Lynch said the team would be patient through the legal process, but if the charges against Foster were proven true, he would be promptly released.