Maria Butina, a Russian national who cultivated relationships with powerful American conservative activists, agreed Monday to plead guilty to conspiring to violate laws prohibiting covert foreign agents. As part of her agreement, which was reviewed by The Daily Beast, she has promised to cooperate with American law enforcement.

As a result of the deal, Butina will become the first Russian national since the 2016 election to plead guilty to a crime connected to efforts to influence American politics. After running a gun rights organization in Russia, she moved to the United States, where she spent years building relationships with conservatives in hopes of influencing a future Republican presidential administration. During the campaign season, she questioned then-candidate Donald Trump about sanctions; built relationships in the upper echelons of the American gun rights community; arranged for NRA leaders to travel to Moscow; and bragged that she was a channel between Team Trump and the Kremlin, as The Daily Beast first revealed.

She also struck up a romance with Paul Erickson, a longtime Republican gadfly close to NRA leaders. He sang Disney songs with her on camera, called her his “Siberian princess” in emails reviewed by The Daily Beast, and—since her July arrest—has visited her regularly in jail.

In March 2015, according to the plea deal, Butina worked with an unnamed U.S. person—known to be Erickson—to draft a proposal for a diplomatic endeavor. Given the fraught relationships between the governments of Russia and the United States, she “cast herself as a possible unofficial transmitter of communications” between the two countries.

Noting that she had recently attended the conference of an unnamed gun rights group—known to be the NRA—she said she had “laid the groundwork for an unofficial channel of communication with the next U.S. administration,” which she predicted would be Republican. And she asked for a Russian billionaire to give her $125,000 to fund efforts to attend conferences and befriend political power-brokers. She sent the proposal to several people, including an official on the Russian central bank known to be Alexander Torshin. The central bank official told her the proposal “would be supported, at least in part.”

Butina helped arrange a trip to Moscow for NRA leaders in December 2015. She pushed for those Americans to visit with senior Russian politicians, according to the plea deal. The Americans on the trip met with Sergey Lavrov, Russia’s powerful minister of foreign affairs; and Dmitry Rogozin, a deputy of Vladimir Putin and a subject of U.S. sanctions.

After the trip, Butina sent a message to the central bank official in Russian that has two translations in the plea agreement.

“We should let them express their gratitude now, we will put pressure on them quietly later,” reads the first translation.

“We should allow them to express their gratitude now, and then quietly press,” reads the second.

Butina also befriended a wealthy, well-connected American who invited her to a “friendship dinner” where he and his peers would discuss U.S.-Russia relations. The deal does not name that American. Before going to the dinner, she emailed its host to say Torshin “is very impressed by you and expresses his great appreciation for what you are doing to restore the relations between the two countries. He also wants you to know that Russians will support the efforts from our side.”

Butina attended several of these “friendship dinners,” according to the plea deal, where she built relationships with powerful Americans and honed her abilities to influence them.

She also helped arrange for a group of Russians to attend the National Prayer Breakfast, which was held on Feb. 2, 2017, according to the plea deal. She emailed Erickson with a list of attendees and said they were coming to the breakfast “to establish a back channel of communication.” Erickson later emailed the list to another person. “Reaction to the delegation’s presence in America will be conveyed DIRECTLY” to Russian President Vladimir Putin and Foreign Minister Sergey Lavrov, he wrote. He cc’d Butina on that email.

During her time in the U.S., Butina updated Torshin on her meetings and conversations. At one point, she asked him whether the Russian “government” was ready to meet with certain, unnamed people.

In July of this year, Butina was arrested and charged on two counts: acting as a covert agent of a foreign government, and conspiring to break federal law by doing so. The specific charge for acting as a foreign agent is colloquially known as Section 951. It’s often confused with the Foreign Agents Registration Act (FARA), but the two are separate. FARA bars secret foreign lobbying, while DOJ lawyers refer to Section 951 as “espionage-lite.” She has only pleaded guilty to the second count, conspiracy. The defense’s estimated sentence for this conviction, according to the plea deal, is up to six months. She has already spent almost five months in jail.

Butina, who turned 30 while incarcerated at the Alexandria Detention Center just south of Washington, has become a figure of geopolitical consequence and international intrigue. The Russian Ministry of Foreign Affairs’ Twitter account made her picture its avatar, along with the hashtag #FreeMariaButina. They claimed she was a political prisoner and a victim of Russophobia. Some Americans—including Kentucky Republican Rep. Thomas Massie—gave credence to that view.

Earlier this week The Daily Beast reported Erickson has received a “target letter” from federal investigators which says they are considering bringing charges against him under Section 951 of the U.S. code—the law barring people from secretly acting as agents of foreign governments.

Butina had once hobnobbed with the stars of the Republican firmament, getting pictures of herself with Gov. Scott Walker, Donald Trump Jr., NRA chief Wayne LaPierre, former Gov. Bobby Jindal, former Sen. Rick Santorum, and former NRA president David Keene. On July 11, 2015, Butina was in Las Vegas at an early rally for Trump’s embryonic presidential campaign, and asked the future president a question about Russian sanctions. Trump gave a surprisingly detailed answer. A year and a half later, she attended the invitation-only Freedom Ball after Trump’s inauguration.

In jail, the quasi-glamor of Washington turned to a nightmare. Like thousands of incarcerated Americans, she struggled with depression and claustrophobia, according to court filings from her lawyers, who say that jail officials never clearly explained why they placed her in solitary confinement for a second stint that began late last month. She was still in solitary when she signed the plea deal.

As part of her deal, she has committed to cooperating with American law enforcement “in any and all to matters as to which the Government deems this cooperation relevant.”

Her future is hazy. She may be welcomed in her home country as a celebrity, as a spy named Anna Chapman was after she was deported from the U.S. in 2010. But Butina could also face a darker homecoming; by the time she returns, if she keeps the deal, she may have spent hours sharing information with the FBI. And Torshin has left his central bank post––meaning her closest known ally has lost most of his power.

Without Butina, Erickson’s future looks rough. He remains a target of the feds, and sources close to him tell The Daily Beast he’s struggling to keep up with his legal bills.