The top lawyer at Swiss pharmaceutical company Novartis stepped down on Wednesday following revelations that the company made payments to President Donald Trump's personal attorney Michael Cohen.

Novartis (NVS) said its general counsel, Felix Ehrat, had decided to retire from his position in the "context of discussions" surrounding the payments to Cohen.

Cohen's company Essential Consultants had a one-year $1.2 million contract with Novartis during the beginning of the Trump administration.

"Although the contract was legally in order, it was an error," Ehrat said in a statement. "As a co-signatory with our former CEO, I take personal responsibility to bring the public debate on this matter to an end."

Related: AT&T CEO says hiring Cohen 'was a big mistake'

Novartis admitted last week it was paying Cohen $100,000 a month. It said it believed that Cohen could advise the company on the Trump administration's approach to healthcare policies, including the Affordable Care Act.

Novartis said its representatives met with Cohen in March 2017. After that meeting, the company determined he wouldn't be useful and decided not to engage with him further.

However, Novartis also said it continued to pay Cohen $100,000 a month until February 2018. It said the payments continued because the contract could not have been terminated.

Several companies admitted last week to having had financial connections to Cohen.