(Updated)

NEW YORK (Reuters) – U.S. President Donald Trump’s former personal lawyer, Michael Cohen, pleaded guilty in New York on Tuesday to campaign finance violations and other charges, saying he made payments to influence the 2016 election at the direction of a candidate for federal office.

The guilty pleas came in the same hour that a federal jury in Alexandria, Virginia, convicted former Trump campaign chairman Paul Manafort of eight charges of tax and bank fraud and failing to disclose foreign bank accounts.

Cohen, 51, appearing in federal court in Manhattan, pleaded guilty to one count of willfully causing an unlawful corporate campaign contribution and one count of making an excessive campaign contribution.

Cohen, one of Trump’s closest associates for more than a decade, said he arranged to make payments "for (the) principal purpose of influencing (the) election" at the direction of a candidate for federal office. He did not give the candidate’s name.

Porn star Stormy Daniels has said Cohen paid her $130,000 shortly before the November 2016 election to keep quiet about a 2006 sexual encounter with Trump.

In addition, Cohen recorded a conversation with Trump two months before the election in which they discussed buying the rights to a story by former Playboy model Karen McDougal, who said she had an affair with Trump, lawyer Rudy Giuliani said last month.

Under U.S. election law, campaign contributions, defined as things of value given to a campaign in order to influence an election, must be disclosed. A payment intended to silence allegations of an affair just before an election could constitute a campaign contribution, some experts have said.

Cohen, who once said he would "take a bullet" for Trump, agreed to a plea bargain with federal prosecutors earlier Tuesday. He also pleaded guilty to five counts of tax fraud and one count of making false statements to a financial institution.

The plea deal includes a possible sentence of up to five years and three months in prison, Judge William Pauley III said during the hearing. Pauley scheduled sentencing for Dec. 12 and set bail at $500,000.

Manafort conviction’s resulted from U.S. Special Counsel Robert Mueller’s investigation into Russian meddling in the 2016 election and possible coordination with Trump’s Republican campaign.

The probe also led to a referral from Mueller about Cohen to federal prosecutors in New York, who began their own probe of the attorney.

Trump has repeatedly denied any collusion with Russia or having sex with Daniels or McDougal, and has called the Mueller investigation a witch hunt. Russia has denied meddling in the election. U.S. intelligence agencies have concluded Moscow interfered.

Cohen, who worked as Trump’s personal attorney at the Trump Organization, continued to advise the president after the election. But their relationship had frayed in recent months.

In court on Tuesday, Cohen’s voice cracked as he answered questions from Pauley.

Asked a standard question about whether he had consumed any alcohol or drugs before making his guilty plea, Cohen said he had had only a glass of 12-year-old Glenlivet, single-malt scotch with dinner the night before.

Cohen agreed to the plea deal to save millions of dollars, protect his family and limit his exposure, Politico said, quoting an unnamed source.

The investigation of Cohen included a raid in April by FBI agents, who seized documents and files from his office, home and hotel room.

The New York Times had reported on Sunday that federal prosecutors were focused on more than $20 million in loans obtained by Cohen from taxi businesses owned by him and his family.

Mueller’s investigation, which began in May 2017, has resulted in the indictment of more than 30 people and five guilty pleas.

The April FBI raids provoked an immediate reaction from Trump, who asked a judge to block prosecutors from reviewing the materials they had seized, citing attorney-client privilege. The effort was unsuccessful.

A number of Cohen’s financial dealings since Trump’s January 2017 inauguration have become public.

Swiss drugmaker Novartis AG has said it had paid Cohen nearly $1.2 million in a consulting deal; U.S. telecommunications company AT&T Inc said it made payments of $600,000; and South Korea’s Korea Aerospace Industries Ltd said it hired him for $150,000.

Critics have said the payments may have been attempts to buy influence with the president.

Cohen also received $500,000 from Columbus Nova LLC, a New York company linked to Russian businessman Viktor Vekselberg. The firm has said the transaction had nothing to do with Vekselberg.