Michael Cohen, U.S. President Donald Trump's former personal attorney, pleaded guilty in Manhattan federal court on Tuesday to eight criminal counts including tax fraud, false statements to a bank and campaign finance violations tied to his work for Trump.

Cohen said in a plea deal that "in coordination and at the direction of a candidate for federal office" he kept information that would have been harmful to the candidate and the campaign from becoming public.

Michael Cohen who was Donald Trump’s personal lawyer for 12 years admitted that he violated election laws during the 2016 presidential election campaign by paying off two women to silence them so that their stories would not impact Trump’s chances.

The women are porn star Stormy Daniels and Playboy model Karen McDougal who Donald Trump has affairs with about a decade ago. In the case of Stormy Daniels whose legal name is Stephanie Clifford, Cohen arranged a nondisclosure agreement for which he paid her $130,000, and for that Cohen was charged with making an excessive campaign contribution, since the payment was made in service of the campaign and exceeded the federal limit.

For McDougal, Cohen and the CEO of a media company "worked together to keep an individual from publicly disclosing" information that would have been harmful to a candidate, saying the individual received $150,000. In the summer of 2016, American Media Inc. paid McDougal $150,000 for a contract that effectively silenced her claims of an affair with Trump.

Cohen’s other counts, totaling eight included tax and bank fraud in a plea deal with federal prosecutors.

Cohen said of the charge linked to McDougal that it was done "for the principal purpose of influencing the election." Regarding the charge linked to Clifford, Cohen said the money "was later repaid to me by the candidate."

Michael Cohen’s guilty-plea deal means he will serve upto five and a half years in prison. His sentencing is scheduled for December 12 of this year.

His days in a lock-up will certainly be a far cry from his days as special counsel and Executive Vice President in the Trump Organization. He had also served on the board of the Eric Trump Foundation and was co-president of the company that managed Trump’s Atlantic City, New Jersey, casinos.

(The above story first appeared on LatestLY on Aug 22, 2018 07:23 AM IST. For more news and updates on politics, world, sports, entertainment and lifestyle, log on to our website latestly.com).