When it came to their dealings in Ukraine over the last year, Lev Parnas and Igor Fruman wore two hats.

The Florida businessmen were helping President Donald Trump's personal lawyer Rudy Giuliani set up meetings with high level Ukrainian officials, according to documents obtained by the State Department inspector general. Giuliani has acknowledged that he lobbied those people to investigate the Bidens and the 2016 campaign, in what Democrats say was an effort to uncover dirt on the president's political enemies.

But Parnas and Fruman were also trying to make money by drumming up a deal to sell liquified natural gas to Ukraine’s big state energy company, and to oust the management at the company with help from their friends in the Trump administration, two people familiar with the matter told NBC News.

The charges filed against the men Thursday allege that their playbook was to pursue political influence as a way of furthering their business interests. That’s exactly what they appeared to be doing with the contributions to a Trump-linked political committee, and their work with Giuliani in Ukraine, according to the two sources.

Parnas and Fruman, both born in the former Soviet Union, boasted of their connections to Giuliani and the White House when they invited an executive at Ukraine’s Naftogaz gas company, Andrew Fovorov, for a meeting in Houston in March, where they made their pitch, the sources said.

They told Fovorov that they wanted Naftogaz CEO Andriy Kobolev removed and Fovorov to take his place, the sources said. Kobolev had won high praise from U.S. and European officials for his anti-corruption efforts.

The two told Fovorov that "they would promote him to replace the current CEO," said the second source familiar with the discussions. They would do that, they said, if he supported their plan to sell American natural gas to Ukraine — a plan that has significant logistical hurdles, the sources said.

The men also predicted that the U.S. ambassador to Ukraine, Marie Yovanovitch, would soon be forced out of her job by the White House, and that would help open the way to their proposed deal, according to the two people.

Parnas and Fruman alleged the ambassador was an obstacle to U.S. business interests, even though there was no evidence to back that up, said Dale Perry, an American energy executive who does business in Ukraine.

“That was extremely surprising and disturbing because I found the ambassador to be very professional,” Perry told NBC News. “That told me that something didn’t smell right.”

Download the NBC News app for breaking news and politics

Parnas and Fruman appeared to have accurate inside information about the administration’s plans. Yovanovitch was abruptly recalled as ambassador two months later, curtailing her scheduled tenure.

Yovanovitch’s premature exit from Kyiv is now at the center of an impeachment inquiry by House Democrats, who accuse President Trump of abusing his power to push Ukraine to investigate his political rival, former vice president Joe Biden and his son. Trump has dismissed the inquiry as a "witch hunt" and the White House says it will refuse to hand over documents or cooperate with the congressional probe.

The administration has defended Trump’s dealings with Ukraine, including a phone call to the Ukrainian President Zelensky, as merely an effort to ensure the government address corruption.

But the bid by Parnas and Fruman to oust Naftogaz’s chief ran counter to a years-long anti-corruption agenda backed by Washington, European governments and the International Monetary Fund, former U.S. officials said.

Perry and the other source said Fovorov immediately rebuffed their proposal, saying he was loyal to the current CEO at Naftogaz, Kobolev, who had recruited him. He viewed Parnas and Fruman as lacking knowledge or credibility in the energy industry in Ukraine, and noted that they had not worked out legal permission or the logistics of moving American LNG via Poland to Ukraine.

Fovorov told business associates about the meeting, and when Perry learned of the conversation, he sent off a memo in April to the U.S. embassy in Kyiv, expressing his concern about what Parnas and Fruman were promoting, Perry said.

The Associated Press first reported on the meeting and the memo written by Perry.

Parnas and Fruman were charged Thursday with funneling foreign money to American candidates as part of a scheme to buy influence in the U.S. political system.

The indictment alleges that Parnas and Fruman conspired to oust Ambassador Yovanovitch at least partially on behalf of an unnamed Ukrainian official.

Their plan to oust Kobolev as CEO at Naftogaz was aimed squarely at one of the country’s most prominent figures seen credited with tackling corruption, a man who has enjoyed strong backing from Western governments in recent years.

"Kobolev is one of the two or three big stars of Ukrainian reform," said John Herbst, a former U.S. ambassador to Ukraine.

The gas sector had been “ground zero” for corruption in Ukraine, and the U.S., European Union and international organizations had pushed for an overhaul of Naftogaz, which had seen its revenues siphoned off by corrupt businessmen and officials, according to Herbst.

Kobolev oversaw a reorganization of the gas company that ended rampant corruption, and its transformation helped turn the country’s budget deficit into a budget surplus, Herbst and other former U.S. officials said.

“Kobolev is a great hero in this. The efforts to rein him in, coming from various parties, are directed against one of the great reform efforts in Ukraine in the past five years,” Herbst said.

Neither the White House nor John Dowd, a former lawyer for Trump who now represents Parnas and Fruman, responded to requests for comment.

Giuliani offered a terse response: "As I have repeatedly said not involved with Naftogaz."

Parnas and Fruman were already in the sights of the House Democrats leading the impeachment inquiry. Democrats requested documents and depositions from Parnas and Fruman after they were cited in a whistleblower’s complaint — though not by name — alleging they aided Giuliani’s effort to launch a Ukrainian corruption probe of Joe Biden.

Rudy Giuliani has coffee with Ukrainian-American businessman Lev Parnas at the Trump International Hotel in Washington on Sept. 20, 2019. Aram Roston / Reuters file

Dowd recently wrote to the House Intelligence Committee saying his clients would not meet a deadline to voluntarily turn over documents relating to their activities with Giuliani. The letter states that Parnas and Fruman “assisted Mr. Giuliani in connection with his representation of President Trump.”

Dowd also wrote that the two assisted Giuliani’s allies, Joseph DiGenova and Victoria Toensing, in their law practice. DiGenova and Toensing are now representing a Ukrainian oligarch, Dmytro Firtash, based in Austria, who is fighting extradition to the U.S. on bribery and racketeering charges.

Hours after Parnas and Fruman were arrested, House Democrats issued subpoenas to the pair Thursday. Dowd has not commented on the indictments or subpoenas.

Parnas and Fruman already have been taken to court by investors, who have accused them of failing to pay debts.

In one case, the family of a stone mason won a $500,000 judgement against Parnas after a judge ruled that Parnas took what was essentially the man life’s savings as part of a movie production scheme that never materialized.