(Reuters) - AT&T Inc T.N on Friday ousted its top lobbyist, and the No. 2 wireless carrier's chief executive said it was a "big mistake" to hire Michael Cohen, President Donald Trump's personal attorney, for advice on working with the Trump administration.

AT&T paid Essential Consultants LLC, a firm set up by Cohen, a total of $600,000 over 2017 for the advice. Cohen and others were hired to help navigate "a wide range of issues," including its proposed $85 billion merger with Time Warner Inc TWX.N, CEO Randall Stephenson said in a memo seen by Reuters.

The disclosure of AT&T’s relationship with Cohen has turned into a major embarrassment for the telecommunications company as it awaits a U.S. judge’s decision, due June 12, on whether it can go through with the purchase of Time Warner, a deal that has been denounced by Trump.

“There is no other way to say it – AT&T hiring Michael Cohen as a political consultant was a big mistake,” the memo said.

President Trump expressed opposition to the merger with Time Warner during the campaign and his administration ultimately chose to fight it, with the Justice Department filing suit in November to block the agreement.

In a fact sheet that accompanied the memo, AT&T said Cohen approached them about working on their behalf in the post-election transition. He was given a one-year contract at $50,000 per month, which ran from January through December 2017, that was limited to consulting and advisory services.

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

FILE PHOTO: Chief Executive Officer of AT&T Randall Stephenson arrives at a U.S. District Court in Washington, D.C., U.S. April 19, 2018. REUTERS/Carlos Barria

“To be clear, everything we did was done according to the law and entirely legitimate,” Stephenson wrote in the memo. “But the fact is our past association with Cohen was a serious misjudgment.”

Stephenson said he took responsibility for the Washington team’s failure to vet Cohen.

AT&T’s head lobbyist, Bob Quinn, who oversaw the hiring of Cohen, is retiring, according to the memo. But two sources familiar with the situation said Quinn was forced to retire.

The sources requested anonymity because they are not permitted to speak to the media. Quinn did not respond to a request for comment.

AT&T’s board of directors does not hold Stephenson responsible for the lack of vetting, according to one source.

The AT&T payments were first revealed by Michael Avenatti, the lawyer for adult film actress Stormy Daniels, who also said a company owned by Russian oligarch Viktor Vekselberg and other corporations paid Essential Consultants for certain services. Avenatti would not say how he obtained the information.

Shares of AT&T rose 1.3 percent to close at $32.29.

Touting his close relationship with Trump, Cohen offered to provide consulting services to Ford Motor CoF.N but his overture was quickly rejected, even before any specific fees were discussed, a person briefed on the matter said on Friday.

Mueller’s team learned of Cohen’s January 2017 offer and has asked Ford for information and records about it and has interviewed Ford’s head of government affairs Ziad Ojakli, the person said.

The office of Robert Mueller, special counsel in the Russia probe, asked Ford about the matter last year and it was unclear if it had made any recent inquiries, the person said.

An attorney for Cohen did not immediately respond to a request for comment.

Cohen’s outreach to Ford was first reported by the Wall Street Journal.

Drugmaker Novartis NOVN.S said on Wednesday it had a $1.2 million contract with Cohen's firm, but soon realized the agreement was a mistake.

Essential Consultants paid $130,000 to Daniels, whose real name is Stephanie Clifford, days before the 2016 presidential election as part of a nondisclosure agreement that barred her from discussing an alleged sexual encounter with Trump. He denies any encounter took place.