Michael Cohen, the former personal attorney to President Donald Trump, on Thursday pleaded guilty to lying to Congress about his involvement in a plan to build a Trump Tower in Moscow.

It came after Cohen agreed to a new plea deal with the special counsel Robert Mueller.

Cohen revealed in court that he was involved in discussions about a plan to build Trump Tower in Moscow well into the 2016 presidential campaign.

Cohen also said he briefed Trump and his family members on the deal multiple times.

Michael Cohen, the former personal attorney to President Donald Trump, on Thursday pleaded guilty to lying to Congress about his involvement in a plan to build a Trump Tower in Moscow.

Cohen, who entered his guilty plea as part of a new deal with the special counsel Robert Mueller, said the discussions about the Trump Tower plan continued until June 2016, well into the presidential campaign, adding that he spoke with Trump and his family members about the deal multiple times, court documents say. Cohen previously claimed that the discussions ended in January 2016, before the Iowa caucus.

June 2016 also happens to be the same month of a controversial meeting between top Trump campaign officials — including Donald Trump Jr. — and a Kremlin-linked lawyer. It's also the month before Trump accepted the Republican Party's presidential nomination.

Read more: Michael Cohen reaches a new plea deal with Mueller, and his dozens of hours of testimony could severely damage Trump

As part of the discussions on the Trump Tower deal, Cohen was in contact with the press secretary for Russian President Vladimir Putin, the documents say. Previously, Cohen claimed that he reached out to Putin's press secretary but didn't receive a response.

Cohen also contemplated traveling to Russia and spoke with Trump and a top campaign associate about the possibility of Trump, then a candidate, traveling to Russia, the documents say.

It marked the first time Trump's business dealings with Russia were discussed openly in court in relation to Mueller's investigation into Russia's interference in the 2016 US presidential election.

Trump has repeatedly claimed that he has no business ties in Russia.

In court on Thursday, Cohen said he lied to Congress to "be consistent with Individual 1's political messaging and out of loyalty to Individual 1," whom he identified as Trump.

Trump subsequently called Cohen a "weak person," accusing his former attorney of lying in order to get a reduced sentence. The president also said that if it were the case that he'd engaged in business dealings with Russia during the 2016 campaign, it "would be nothing wrong."

"I was running my business while I was campaigning," he said.