Swiss drugmaker Novartis has ended a contract with a firm linked to U.S. President Donald Trump's lawyer, Michael Cohen, saying it was now seen as a mistake.

Novartis, which has not been accused of any illegal activity, made payments totalling nearly $1.2 million to the U.S. firm. It was approached last year by the U.S. special counsel, who wanted to know about the money while probing potential meddling in the 2016 U.S. election.

The company said it had ended the one-year contract with Cohen's firm struck in February 2017. An attorney for porn star Stormy Daniels named Novartis among companies that made payments to Cohen's Essential Consultants outfit until early this year.