The charge was brought by Special Counsel Robert Mueller, who is investigating Russian interference in the presidential election, and was the result of his cooperation with that probe.

NEW YORK — Michael Cohen, President Donald Trump's former lawyer, made a surprise appearance before a federal judge in New York on Thursday and pleaded guilty to lying to Congress to cover up that he was negotiating a real estate deal in Moscow on Trump's behalf during the heat of his campaign for the Republican presidential nomination.

Trump called Cohen a "weak person" who is lying to get a lighter sentence.

The charge was brought by Special Counsel Robert Mueller, who is investigating Russian interference in the presidential election, and was the result of his cooperation with that probe.

Flanked by his lawyers, Cohen admitted making false statements about the project in 2017 to Senate and House intelligence committees, which at the time were investigating possible connections between the Trump campaign and Russia.

His comments made clear that his communications with Trump about the project were much more frequent than he had suggested.

Cohen, 52, wearing a blue tie and dark suit, was noticeably relaxed throughout the appearance in a packed Manhattan courtroom, unlike his irritable and emotional demeanor when he entered a guilty plea during the summer.

Cohen told the judge he lied about the timing of the negotiations, his communications with people in the company and in Russia about the deal, and other details to be loyal to Trump and consistent with Trump's "political messaging." Cohen and prosecutors referred to Trump as "individual one" throughout Thursday's proceedings and said he lied "to be loyal to Individual One."

Among other lies, Cohen said he told Congress that all discussions about building a Trump Tower in Moscow had ended by January 2016, when they had actually continued until June of that year.

He said he also lied about his contacts with Russian officials and lied when he said he never agreed to travel to Russia in connection with the project and never discussed with Trump plans to travel to Moscow to support the project.

Prosecutors said in a court document that Cohen had misled Congress to give a false impression that the Moscow project had ended before the Iowa caucus and first Republican presidential primary in 2016.

As he left the White House shortly after the court proceeding concluded, Trump called Cohen "a weak person"

"Michael Cohen is lying and he's trying to get a reduced sentence," Trump said.

Nothing said in court, or in associated court filings, addressed whether Trump or his aides had directed Cohen to mislead Congress.

The charges were handled by Mueller's team, not the federal prosecutors in New York who handled Cohen's previous guilty plea in August to other federal charges involving his taxi businesses, bank fraud and his campaign work for Trump. Cohen is scheduled to be sentenced Dec. 12.

Cohen declined to comment as he left the courtroom.

Cohen's lawyer, Guy Petrillo, noted that a letter from federal prosecutors showed that Cohen's cooperation with Mueller will be described to Cohen's sentencing judge. However, the letter makes clear that Cohen is not receiving the kind of "5K1.1" letter written on behalf of formal government cooperators.

Reacting to the plea, House Speaker Paul Ryan said Cohen "should be prosecuted to the extent of the law. That's why we put people under oath."

Cohen gave a statement to congressional committees last year saying the president's company pursued a project in Moscow during the Republican primary but that the plan was abandoned "for a variety of business reasons."

Cohen also said he sent an email to the spokesman for Russian President Vladimir Putin as part of the potential deal.

In his statement, he said that he worked on the real estate proposal with Felix Sater, a Russia-born associate who he said claimed to have deep connections in Moscow.

The discussions about the potential development began after Trump had declared his candidacy. Cohen had said the talks ended when he determined that the project was not feasible.

Cohen had also disclosed that Trump was personally aware of the deal, signing a letter of intent and discussing it with Cohen on two other occasions.