A former Trump aide now under federal investigation as part of the Russia probe earned millions working for a corrupt pro-Russian political party that repeatedly disparaged America's most important military alliance.

Paul Manafort, who was Trump's campaign chief from May to August 2016, spent nearly a decade as a consultant to Ukraine's Party of Regions and its standardbearer, Viktor Yanukovych.

Backed by Russian-leaning oligarchs, the party opposed NATO membership and spouted anti-Western rhetoric that once helped fuel violence against American marines. Its reign ended when Yanukovych fled to Russia after bloody street protests against his personal corruption and pro-Moscow actions.

Paul Manafort speaks during a primary night event at the Trump National Golf Club Westchester in Briarcliff Manor, New York, U.S., on June 7, 2016. Victor Blue / Bloomberg via Getty Images file

Manafort has always said he tried to Westernize the party and steer it towards a democratic model, and denies any part in anti-NATO messaging, but Ukrainian critics and U.S. diplomats who served in Kiev aren't so sure.

Related: Donald Trump Aide Paul Manafort Scrutinized for Russian Business Ties

Manafort also earned millions doing private business deals with some of the oligarchs who backed the party.

As NBC News previously reported, federal officials say that the money Manafort earned from both the party and the oligarchs — and what he did with it — are part of what has drawn the attention of investigators. New details keep emerging as U.S. and Ukrainian officials piece together Manafort's contacts and payments in Ukraine from 2004 to 2014.

Manafort Goes to Ukraine

Manafort, the son of a wealthy Connecticut builder, had worked as a lobbyist and as an aide for Republican presidents before his stint in Ukraine. He had built a reputation for repackaging controversial foreign leaders for U.S. consumption. Filipino dictator Ferdinand Marcos, Angolan guerilla leader Jonas Savimbi, and Zairian strongman Mobutu Sese Seko were among his clients.

In 2004, Manafort was hired by clients in Ukraine who needed a similar image overhaul.

Viktor Yanukovych on February 21, 2014 Getty Images, file

Viktor Yanukovych had been governor of Donetsk, a Russian-speaking region close to the Russian border, and then the prime minister of Ukraine. He and his faction, the Party of Regions, were thought by many Western observers to have links to organized crime. As a young man, Yanukovych had been convicted of robbery and assault.

John Herbst, who was U.S. ambassador to Ukraine from 2004 to 2006, said the motivations of the oligarchs who ran the party seemed uncomplicated. "My impression of Yanukovych and the others — and I knew most of the senior folks — it was all about getting rich or richer, and maintaining power."

Aided by high-priced Russian political consultants, Yanukovych ran for president of Ukraine in 2004, and seemed to have won.

Related: Flynn, Manafort Are Key Figures in Russia Probe Mueller Will Lead

But the election was tainted by charges of fraud and corruption — most against Yanukovych and the Party of Regions — and an attempted assassination. A month prior to balloting, someone poisoned Yanukovych's main rival, pro-Western candidate Viktor Yushchenko, and nearly killed him. On Election Day, Yanukovych, who had trailed in polls by double digits, won by three points, sparking accusations of voter fraud.

The government voided the election results and scheduled a do-over.

Weeks before the December 2004 presidential "re"-election, a pro-Russian Ukrainian billionaire and major Party of Regions donor named Rinat Akhmetov asked Manafort to help with Yanukovych's troubled campaign.

Yanukovych lost the do-over election to Yushchenko, but Manafort won a job he would keep for a decade.

Manafort was hired to prepare the Party of Regions for the parliamentary elections of 2006, in which Yanukovych would try to reclaim the office of prime minister.

By 2006, Manafort and his team were "the principal political consultants in the Party of Regions," said Taras Chornovil, a former Ukrainian Parliament deputy who was a member of the party from 2004 to 2007.

A leaked U.S. State Department cable from 2006 said that Manafort's job was to give the Party of Regions an "extreme makeover" and "change its image from … a haven for mobsters into that of a legitimate political party."

Related: FBI Making Inquiries Into Ex-Trump Campaign Manager's Foreign Ties

Manafort allegedly came up with the POR's slogan for the 2006 election, "A Better Life Today." Though Manafort couldn't speak Russian or Ukrainian, he taught Yankovych how to give a speech and how to stay on message.

Taras Chornovil was formerly a campaign manager and a member of parliament for Ukraine's Party of Regions. NBC News

According to Chornovil, Manafort's campaign tactics that year also included mandating that Yanukovych surrogates wear make-up and Hugo Boss suits during TV interviews. After their TV appearances, they had to return the rented suits to party headquarters, Chornovil said.

When Chornovil complained about Manafort to a close associate of Yanukovych, Chornovil said the man told him Manafort was untouchable — "a big cheese here, in charge of everything."

Manafort was also trying to help Yanukovych expand his base of support.

Ukraine has a sharp political and geographic divide between its pro-Western, Ukrainian-speaking majority and a large Russian minority that looks East.

While other American consultants, both Democratic and Republican, were working on the campaigns of Ukraine's pro-Western "Orange" parties, Manafort was working for a party whose base was in Russian-speaking Eastern Ukraine. Manafort's new bosses were oligarchs friendly to Moscow, and hostile to America's principal military alliance, NATO.

Taras Berezovets advised one of Yanukovych's main political foes. NBC News

Said Herbst, "They were pro-Russian because that's where their voters were politically and culturally. So they would not have gotten them if they were arguing for NATO — let's join NATO — policies."

Skepticism about NATO had the virtue of appealing to many Ukrainian speakers as well. Nationwide, more than half of the public opposed joining the military alliance.

"They were pro-Russian because that's where their voters were."

He could attract pro-Western Ukrainians, meanwhile, by broadcasting his support for European Union membership. Some oligarchs behind the party were eager to do business with Europe anyway.

Bill Taylor, who was U.S. ambassador to Ukraine from 2006 to 2009, said Manafort would contact the U.S. embassy and tell them he was urging his client to look West. "[He said] he'd tell Yanukovych, 'You'll do better in Western Ukraine if you orient more toward Europe," recalled Taylor. "'To broaden your base, you should orient toward the EU.'"

For the next eight years, Yanukovych would adjust his positions on NATO and the EU as needed, tacking East or West depending on the electoral winds and his audience.

Sometimes his party's public actions and Yanukovych's private assurances to Western officials were at odds.

"[Yanukovych] was willing to allow all kinds of cooperation with NATO," which the Russians did not like, said Amb. Herbst, "but it's true that [Yanukovych] was organizing rallies against NATO exercises."

State Department cables show that soon after the Party of Regions helped stoke anti-NATO protests that spurred an attack on U.S. marines in Crimea, Yanukovych told the U.S. ambassador he wanted Ukraine to join the military alliance.

Through a spokesman, Manafort says his role with Yanukovych and the POR was "strategist and consultant." Manafort recommended "strategy and messaging," he said, "especially as it related to the campaign and fulfillment of campaign promises." The party's political campaigns, said the spokesman, were "built on a foundation of economic recovery and building a relationship with the West that supported and focused on Ukraine being a part of the European Union."

Critics of Manafort, however, insist his gameplan for the 2006 election was to drive a wedge into the electorate. Chornovil, Serhiy Leshchenko, a Ukrainian lawmaker and former investigative journalist, and Taras Berezovets, who advised one of Yanukovych's main political foes, all say Manafort's strategy was based on polarizing the voting public. They say he wanted to set Russian speakers against Ukrainian speakers, and supporters of Moscow against supporters of NATO.

According to Berezovets, "His idea was to [use] the matter of language to divide the electorate. The whole idea, it really worked."

Inna Bohoslovska was a Party of Regions-aligned member of Ukraine's Parliament. NBC News

Along with advocacy of making Russian the second, official state language, Manafort pushed "anti-NATO propaganda," said Chornovil.

Berezovets called anti-NATO rhetoric "one of the key ideas of Paul Manafort."

A former U.S. diplomat in the region said he doubted using wedge issues like NATO was Manafort's idea, but said, "Manafort was not above telling Yanukovych to exploit wedge issues." He also acknowledged it could seem odd for a U.S. citizen to be advising an anti-NATO candidate: "I think he probably distinguishes his personal values from his political advice."

Through his spokesman, Manafort said he never had anything to do with any anti-NATO rhetoric. "Mr. Manafort encouraged the POR to move towards the West and NATO."

The Party of Regions won the parliamentary elections in 2006, making Yanukovych prime minister again.

'I Am Trying to Play a Constructive Role'

Yanukovych had to run for prime minister again in 2007. Accusations of corruption and links to the Putin regime were damaging his client's prospects, so Manafort went back to work grooming his image.

Responding to criticism that he was simply repackaging a flawed candidate, Manafort told the New York Times at the time, "I am not here just for the election…I am trying to play a constructive role in developing a democracy. I am helping to build a political party."

Manafort hired the American public relations firm Edelman to boost Yanukovych's public image in Europe and the U.S. for a monthly retainer of $35,000.

Yanukovych, meanwhile, traveled to Germany as part of a bid for European Union membership. "In public and private statements both at home and abroad," said another leaked cable, "Yanukovych consistently reiterates his government's commitment to Europe."

Yanukovych lost the 2007 race. After the loss, both he and his party tacked East with overt anti-NATO rhetoric, a response to Yushchenko's push for Ukraine to join NATO.

Opposition deputies use flags and balloons to protest NATO integration on February 12, 2008 in the Ukrainian parliament in Kiev. Genia Savilov / AFP/Getty Images file

From January through April 2008, the Party of Regions mounted a slick, well-coordinated campaign against Ukraine's NATO membership. The "NATO No" slogan appeared on giant television screens and mass-produced blue signs at rallies where Yanukovych spoke. The same slogan was emblazoned on blue and yellow signs carried by the party's members of Parliament onto the floor of the Parliament in February.

Provided with examples of the messaging, Manafort's spokesman declined to comment.

In 2010, Yanukovych ran for president again, and Manafort again worked for him. This time, Yanukovych pledged to end Ukraine's NATO bid. Ukraine should not be a member of any military bloc, he said, because "this is the view of the Ukrainian people." During a meeting with the U.S. ambassador, he said he wanted to "improve cooperation with the U.S. and NATO, but was also interested in "restoring" relations with Russia.

He was elected president, and this time turned East for good.

"Either Manafort was wrong about his guy, or he just didn't care," said Dan Fried, a former assistant secretary of state for the region under George W. Bush and Obama. "I think Manafort would've preferred his guy be the guy he said he was, but he was okay if he wasn't. He was doing a job for a client. That's it."

A year into Yanukovych's presidency, his administration prosecuted his chief political rival, former "Orange" Prime Minister Yulia Tymoshenko, for allegedly abusing her position during her time in office. She was sentenced to seven years in prison. Many international observers condemned the prosecution as politically motivated.

Former Ukrainian Prime Minister Yulia Tymoshenko, left, and her husband Oleksandr exit booths at a polling station during parliamentary elections in Dnipropetrovsk, Ukraine on October 26, 2014. Alexander Pokopenko / AP file

Manafort again looked to the U.S. to burnish his client's image, and dispel charges that Yanukovych was a corrupt, pro-Putin autocrat. He arranged for Yanukovych's administration to hire the law firm Skadden Arps to do a legal review of the prosecution. The resulting brief pointed out some serious procedural flaws, but was largely approving of the Ukrainian court.

Around the same time, however, the Yanukovych administration began to strengthen its ties to the Putin regime and to further Russify the Party of Regions.

According to Inna Bohoslovska, who was a Party of Regions-aligned member of parliament at the time, starting in 2012, "[Ethnically] Russian candidates were placed in all the strong positions. Ministry of Defense, Ministry of Security Service."

Yanukovych then reversed his position on integrating Ukraine with Europe. Ukraine was about to sign an EU association agreement, making its turn away from Russia and towards the West official, when Yanukovych backed out a week before an official signing ceremony.

A protester throws a molotov cocktail at riot police in the center of Kiev on Jan. 22, 2014, as clashes continued following two months of protests over President Viktor Yanukovych's failure to sign a deal for closer ties with the EU. VASILY MAXIMOV / AFP - Getty Images

Said Fried, "[Yanukovych] broke more than a campaign promise, he broke his compact with the Ukrainian people."

Yanukovych's popularity plummeted. His EU decision ignited massive demonstrations in the streets of Kiev, with some crowds as big as 1 million. Ukrainian police cracked down on protestors, and both police and protestors were killed in street violence that took at least 100 lives.

After three months of demonstrations, Yanukovych was ousted as president in February 2014. He fled to Russia. Activists broke into Mezhyhirya, his ornate presidential palace, and were outraged by its gold-plated opulence. "[Manafort] knew that the president's salary was not enough for the luxury of the Mezhyhirya, so he should have been aware that it was anything but legal money," said a top Ukrainian anti-corruption investigator.

"There's a time to jump ship, and that's when he starts shooting people."

Russian troops invaded Crimea shortly afterwards, citing Ukrainian unrest and Yanukovych's ouster as justifications. Russia has now annexed Crimea.

Manafort's allies have said that Yanukovych stopped listening to Manafort after he became president in 2010, and that Manafort warned him of the consequences of actions like prosecuting Tymoshenko. Manafort's spokesman said Manafort "was not involved in any of the actions taken in the street riots and opposed the use of force."

President Viktor Yanukovych's palatial residence outside Kiev on Feb, 22, 2014 after Yanukovych had fled east. Efrem Lukatsky / AP

"If you're going to work for someone like Yanukovych," said Fried, "there's a time to jump ship, and that's when he starts shooting people."

Manafort returned to Ukraine after Yanukovych fled the country. He tried, with limited success, to help remnants of the Party of Regions regain power in the October 2014 parliamentary elections.

Yanukovych remains in Russia. He has been sanctioned by the EU and the U.S. for the Crimea invasion, and is wanted by Ukraine for a long list of charges that have included corruption and murder.

"Yanukovych was so awful," said Fried. "That's not Manafort's fault, but the fact that Manafort helped Yanukovych win an election didn't do Ukraine any good."

Who Paid The Bills?

Manafort says the 2014 election was his last in Ukraine, and he is done with Ukrainian politics.

But he is now facing questions from Congress and federal investigators about how he was paid for his political work, what he did with the money he earned, and what other business relationships he developed while in Ukraine.

A Party of Regions accounting book, dubbed the "black ledger" and obtained in August by Ukraine's National Anti-Corruption Bureau (NABU), allegedly shows that Manafort was paid $12.7 million in cash by the party between Nov. 2007 and Oct. 2012.

The ledger records what Ukrainian investigators say were off-the-books payments by the Party of Regions to election officials, party functionaries, and members of parliament. Manafort appears as an intended recipient in the ledger 22 times from 2007 until 2012, according to the NABU. The Bureau notes that the entries are not themselves proof that the payments were made.

In March, journalist Serhiy Leshchenko made waves when he said he had obtained an invoice on Manafort company letterhead detailing how Manafort received money from a shell company in Belize for the alleged sale of 500 computers.

Ukrainian journalist and member of parliament Serhiy Leshchenko holds pages showing alleged payments to Paul Manafort from an accounting book of the party of former Ukrainian president Viktor Yanukovych during a press conference in Kiev on Aug. 19, 2016. Sergei Supinsky / AFP-Getty Images

The date on the invoice and the amount of money match an entry in the black ledger marked "Manafort." Manafort's spokesman dismissed the invoice and letterhead as fabricated. The shell company, Neocom Systems Ltd., was registered with Belize's International Business Company Registry, but the principal of the firm that registered the shell company told NBC News he had only dealt with its lawyers, and couldn't provide any information about its owners. It was struck from the registry in 2011 and dissolved in 2014, according to the Belizean registry.

Manafort has described the ledger as a forgery. He says any payments he received from Ukraine were legitimate compensation for his work as a consultant, and the payments were lawfully wired to him.

Manafort's spokesman told NBC News that Manafort "has no knowledge of any payment ledger. Mr. Manafort was only paid via wire — not cash — through U.S. institutions, typically using clients' preferred financial institutions and instructions."

The spokesman said Manafort declined to answer whether he had reported to the U.S. government all money and income received from Ukraine.

Ukrainian investigators told NBC News they are now looking into Manafort's role in the Skadden deal, but say Manafort is not a suspect in any of their investigations.

Manafort also did business with several Ukrainian and Russian oligarchs.

In 2008, Manafort and his real estate partners courted a Ukrainian oligarch named Dmytro Firtash, a major Party of Regions backer, in an $850 million plan to redevelop a famous New York hotel, the Drake. The plan never bore fruit.

Firtash, who acknowledged to the U.S. ambassador that he got his start in business with the permission of a Russian crime lord, according to a leaked cable, is under federal indictment in the Northern District of Illinois for bribery. He is under arrest in Austria pending his extradition to the U.S.

In 2007, Manafort went into business with Russian billionaire Oleg Deripaska to invest in Ukrainian and European assets. Manafort's partner Rick Gates "regularly visited" the Moscow offices of Deripaska's representatives to discuss the investments, according to a later lawsuit.

In 2007 and 2008, companies controlled by Deripaska paid $26.25 million in investment capital and management fees to Manafort and his partners for a deal to buy a cable television company in Ukraine, according to a U.S. court filing. According to Manafort's spokesman, all the capital was paid to the seller of the company, but Deripaska's legal representatives alleged the investment was never actually made.

By 2014, Manafort and Deripaska had fallen out over the cable deal, which never materialized.

What did Manafort do with his Ukrainian millions?

He was associated with at least 15 bank accounts and 10 companies on Cyprus, dating back to 2007, according to two banking sources with direct knowledge.

Related: Manafort-Linked Accounts on Cyprus Raised Red Flags

The sources told NBC News' Richard Engel that after certain transactions raised concern, the bank began investigating the accounts for possible money-laundering. Manafort closed some of the accounts in 2012.

A spokesman for Manafort told NBC News that all the accounts were set up at the direction of clients in Cyprus, a common banking center for Russians and Ukrainians, "for a legitimate business purpose."

As NBC News and others previously reported, Manafort also bought four properties in New York City between 2006 and 2013, apparently for cash, and then took out more than $15 million in loans on them between 2015 and 2017.

Related: Ex-Trump Aide Manafort Bought New York Homes With Cash

A source familiar with the matter said New York Attorney General Eric Schneiderman is taking "a preliminary look" at Manafort's real estate transactions.

Manafort said his transactions were "executed in a transparent fashion and my identity was disclosed — in fact my name is right there on the documents."

In September 2016, NBC News has reported Manafort took out a mortgage on his home in Bridgehampton, New York, but no mortgage notice was ever filed and no mortgage tax paid, according to Suffolk County records. His name did not appear on any publicly available documents.

Related: Feds Subpoena Records for $3.5 Million Mystery Mortgage on Manafort Home

A spokesperson for Manafort said the mortgage was a bridge loan and was paid off by December. Manafort's lawyer said the mortgage paperwork was rejected because of an error and was never refiled.

Federal investigators have now subpoenaed records related to that loan.