Image copyright Getty Images Image caption AT&T used Donald Trump's lawyer Michael Cohen as a consultant

AT&T's chief executive said hiring Donald Trump's lawyer, Michael Cohen, as a consultant was a "big mistake".

AT&T paid Essential Consultants, a company used by Mr Cohen, to advise on issues including AT&T's pending takeover of Time Warner.

The same firm was also used to pay off porn star Stormy Daniels during the 2016 election.

The AT&T chief, Randall Stephenson, made the comments in a memo to employees on Friday.

"Everything we did was done according to the law and entirely legitimate. But the fact is our past association with [Michael] Cohen was a serious misjudgement," he said.

AT&T's head lobbyist, Bob Quinn, who oversaw the hiring of Cohen, is retiring, the memo added.

AT&T has said its $50,000-a-month contract with Essential Consultants ended in December 2017.

That was just a few weeks after the US Justice Department sued to block the firm's acquisition of Time Warner, citing concerns about competition.

The outcome of that lawsuit is pending.

AT&T never asked Mr Cohen to set up meetings for the company with anyone in the Trump administration, and he did not offer to do so, the memo said.

But the disclosure of the relationship has "damaged" the firm's reputation. Mr Stephenson said: "There is no other way to say it - AT&T hiring Michael Cohen as a political consultant was a big mistake."

AT&T is one of several firms, including pharmaceutical firm Novartis and a company linked to Russian oligarch Viktor Vekselberg, that has admitted making payments to Essential Consultants.

The head of Novartis has also called its payments a mistake.

The firm was set up by Mr Cohen, who is under federal investigation for his business dealings.

The payments by the companies were revealed this week by the lawyer for Stormy Daniels, who alleges she had a sexual relationship with Mr Trump in 2006 - a claim the president denies.

Ms Daniels, whose real name is Stephanie Clifford, was paid $130,000 (£92,000) by Essential Consultants during the 2016 presidential campaign in exchange for signing a non-disclosure agreement.

She is suing to break that agreement.