WASHINGTON — The gunslinging Russian woman accused of cozying up to American officials to infiltrate the U.S. political system — at the behest of her Kremlin-linked mentor and with the help of her American boyfriend — allegedly tried to trade sex for influence.

The "Red Sparrow" scenario was unveiled Wednesday in a government memorandum that laid out the reasons why prosecutors believe Mariia Butina, 29, should remain jailed until trial.

During a detention hearing in federal court on Wednesday afternoon, Butina pleaded not guilty to being an unregistered foreign agent and was again ordered held without bail.

Butina's attorney said his client, who came to the U.S. in 2016 on a graduate student visa, could be trusted to stay on American soil. But prosecutors argued she was too great a flight risk, with no roots in the U.S. and strong links to Russian intelligence.

In court papers, prosecutors said her only tie to the U.S. is a "personal relationship" with an unidentified man whose description matches that of Republican operative Paul Erickson, according to the Washington Post.

Although Butina lived with the man, the relationship was "duplicitous," prosecutors said, suggesting that she had no real interest in him and was using him to further her goals.

"Butina appears to treat it [the relationship] as simply a necessary aspect of her activities," the prosecutors' memo said.

"For example, on at least one occasion, Butina offered an individual other than U.S. Person 1 sex in exchange for a position within a special interest organization. Further, in papers seized by the FBI, Butina complained about living with U.S. Person 1 and expressed disdain for continuing to cohabitate with U.S. Person 1."

Court papers show that the American politico tried to help Butina make inroads in Washington, suggesting names of people she should meet. The FBI said in an affidavit that Butina also sought to establish relationships with a "gun rights organization." The organization was not named but a senior U.S. official confirmed it was the National Rifle Association, which did not respond to repeated requests for comment.

Prosecutors said she was the protege of a Russian politician and banker, identified by sources as Aleksandr Torshin, who considered her a covert agent and compared her with a fellow redhead, the flame-haired Russian spy Anna Chapman.

They cited a March 2017 message from Torshin to Butina after news stories about her activities in Washington that focused on her background as a gun rights activist and included photos of her posing with weapons.

"Good morning! How are you faring there in the rays of the new fame?" he wrote. "Are your admirers asking for your autographs yet? You have upstaged Anna Chapman. She poses with toy pistols, while you are being published with real ones. There are a hell of a lot of rumors circulating here about me too! Very funny!"

The government's memo also said that Butina maintained contact information for "individuals identified as employees of the Russian FSB," which is the successor to the KGB, and recently had dinner with a Russian diplomat suspected of being a Russian intelligence officer.

You have upstaged Anna Chapman. She poses with toy pistols, while you are being published with real ones.

In the days before her arrest, she appeared to be making plans to leave Washington and possibly the country, making a trip to U-Haul with her American companion and wiring $3,500 to an account in Washington, they said.

Butina's lawyer, Robert Driscoll, said her relationships with Russian officials were innocuous and stemmed from her notoriety in Russia as a pro-gun figure.

"My client is famous in Russia," he said.

He said Butina, an A student at American University, has been cooperating with the government for months, appearing before the Senate Intelligence Committee and allowing FBI agents to search her apartment in April.

"While we respect the judge’s decision, we strongly disagree that there were no conditions of release or incarceration to detain an innocent student before trial," Driscoll said after the detention hearing.

"She’s been aware of a criminal investigation into her conduct for months and made no effort or attempt to flee nor as the government, who has had her under surveillance the entire time, alleged that she has."

A spokeswoman for Russia's Foreign Ministry questioned the timing of her arrest, which came shortly after President Donald Trump met with Russian President Vladimir Putin.

"It seems that somebody just got out a calculator and a watch to figure out when this decision about the arrest of Mariia Butina should be taken, in order to do everything possible to derail the outcome of the summit that was held with the Russia and American presidents," the spokeswoman, Maria Zakharova, said.

"Everything was done to coincide with this."