President Trump and first lady Melania Trump arrive Thursday in Argentina for the G-20 summit. (AFP/Getty Images)

President Trump on Friday defended his pursuit of a real estate project in Russia at the same time he was securing the Republican presidential nomination in 2016, saying it was “very legal & very cool.”

In a pair of tweets sent from Buenos Aires, where he is attending a Group of 20 summit, Trump mocked scrutiny of his Russian business exploration as a “Witch Hunt!”

The president’s statement came after his former personal attorney, Michael Cohen, pleaded guilty Thursday in New York to lying to Congress about the Moscow project in an attempt to minimize links between the proposed development and Trump’s presidential campaign.

Trump wrote on Twitter: “Oh, I get it! I am a very good developer, happily living my life, when I see our Country going in the wrong direction (to put it mildly). Against all odds, I decide to run for President & continue to run my business-very legal & very cool, talked about it on the campaign trail...”

He added in a second tweet, “....Lightly looked at doing a building somewhere in Russia. Put up zero money, zero guarantees and didn’t do the project. Witch Hunt!”

Though Trump frequently touted his real estate business generally on the campaign trail, he did not bring up his interest in a Moscow project as he ran for president and repeatedly denied that he had deals in Russia.

As part of his plea, Cohen said he had lied for the person listed in court documents as “Individual 1” — whom Cohen identified in court as Trump. To hew closely to Trump’s public denials of such connections, Cohen said he knowingly gave false answers in 2017 to the Senate and House intelligence committees.

Cohen admitted to falsely claiming that efforts to build a Trump-branded tower in Moscow ended in January 2016, when in fact discussions continued through June of that year, the filing said.

After the plea, Trump told reporters at the White House on Thursday that Cohen was “a weak person” and insisted that he himself had done nothing wrong.

“Michael Cohen is lying, and he’s trying to get a reduced sentence for things that have nothing to do with me,” the president said. “This was a project that we didn’t do, I didn’t do. . . . There would be nothing wrong if I did do it.”

Talking about his 2016 campaign against Democrat Hillary Clinton, Trump added: “There was a good chance that I wouldn’t have won, in which case I would have gone back into the business, and why should I lose lots of opportunities?”

Trump’s attempt to expand his brand into Moscow capped a 30-year-long effort by the celebrity mogul to do business in Russia.

On Friday, Trump weighed in on his proposed Russian real estate venture a few minutes before departing his hotel in Buenos Aires en route to meet with Argentine President Mauricio Macri at Casa Rosada, Argentina’s presidential residence, in the first in a series of bilateral meetings between Trump and other global leaders on the sidelines of the Group of 20 summit here.

Later Friday morning, Trump formally signed the USMCA trade agreement among the United States, Mexico and Canada at a ceremony including leaders from all three countries.

Trump has repeatedly lambasted special counsel Robert S. Mueller III this week for his probe into Russian interference in the 2016 election. In tweets over the past four days, the president has accused the special counsel of being a “prosecutor gone rogue” and compared his prosecutions to those of the McCarthy era.

In a tweet Friday morning, Trump’s personal lawyer, Rudolph W. Giuliani, criticized the media for “hysterical coverage” of Cohen’s plea and asserted that the action demonstrates that Mueller’s team has “no evidence of collusion” between Russia and Trump’s campaign.

Giuliani also mocked Mueller for pursuing charges of lying to Congress and prosecutors, writing that “he is keeping America safe from false statement makers or people with faulty memories or both.”

Later Friday, Giuliani took issue with the timing of Cohen’s plea announcement. In a tweet, Giuliani noted that it came just as Trump was leaving for the G-20 summit and that Mueller had indicted a group of Russians shortly before Trump left the country in July for a meeting with Putin.

“Either could have been done earlier or later,” Giuliani said. “Out of control! Supervision please?”

Wagner reported from Washington.