Three days after President Donald Trump was sworn into office, the telecom giant AT&T turned to his personal attorney Michael Cohen for help on a wide portfolio of issues pending before the federal government — including the company’s proposed merger with Time Warner, according to documents obtained by The Washington Post.

The internal documents reveal for the first time that Cohen’s $600,000 deal with AT&T specified that he would provide advice on the $85 billion merger, which required the approval of federal antitrust regulators.

Trump had voiced opposition to the merger during the campaign and his administration ultimately sided against AT&T. The Department of Justice filed suit in November to block the deal, a case that is still pending.

Cohen’s deals with AT&T and other corporate clients were first revealed this week by an attorney for adult-film star Stormy Daniels, but the new documents obtained by The Post offered greater detail about his arrangement with telecom company and the type of work he had been hired to perform.

It is unclear what insight Cohen — a longtime real estate attorney and former taxi cab operator — could have provided AT&T on complex telecom matters.

At the same time he was collecting $50,000 a month from AT&T, Cohen was being paid large sums to advise other companies on a broad variety of issues, including the Affordable Care Act, accounting practices and real estate.

In the wake of Trump’s election, corporate clients paid Cohen at least $2.95 million through a company called Essential Consultants, according to figures confirmed by the companies.

Essential Consultants was the same company Cohen used in October 2016 to route money to Daniels in exchange for her agreement not to disclose an alleged affair with Trump.

The corporate payments he received demonstrate how Cohen was able to turn his ties with the new president into money-making opportunities, despite Trump’s campaign pledges to “drain the swamp.”

AT&T and the pharmaceutical company Novartis, another Cohen client, said this week that they provided information about their dealings with Trump’s lawyer to special counsel Robert Mueller III last year. Cohen is also under investigation by prosecutors in New York for possible bank fraud and campaign finance violations.

The $600,000 that flowed to Cohen from AT&T was the equivalent of 3.5 percent of the $16.8 million the company spent on lobbying in 2017, according to disclosure forms.

A “scope of work” describing Cohen’s contract in an internal AT&T document shows that he was hired to “focus on specific long-term planning initiatives as well as the immediate issue of corporate tax reform and the acquisition of Time Warner.”

He was also directed to “creatively address political and communications issues” facing the company and advise the company on matters before the Federal Communications Commission.

AT&T declined to comment on the documents, which were provided to The Post anonymously, but did not challenge their authenticity.

Cohen’s lawyer, Stephen Ryan, declined to comment. Cohen did not respond to requests for comment.

The internal AT&T documents show that Cohen was supposed to spend half of his time on “legislative policy development” and the other half on “regulatory policy development.” Payments to Cohen were approved by two executives in AT&T’s public affairs office in Washington.

The documents specified that Cohen, who was not a registered lobbyist, was to spend none of his time engaged in lobbying. They described his work as advising the company, not contacting federal officials.

Under federal rules, individuals must register as lobbyists if they spend 20 percent of their time working for a client on legislative and executive branch issues and if they have had contact with at least two government officials related to that client, according to Larry Noble, a former general counsel of the Federal Election Commission and an expert on lobbying law.

Cohen’s work for AT&T did not appear to meet that definition, Noble said. However, he noted that hiring the president’s lawyer could trigger ethical questions.

“It is an ethical concern if you have a lawyer who appears to be selling access to a current client, who is president,” Noble said.

Rudy Giuliani, a lawyer for Trump, said Wednesday that the president was unaware of Cohen’s consulting agreements.

AT&T has declined to comment on the specific amount it paid to Essential Consultants. Under the one-year contract, the company has said, Cohen was hired to provide “insights into understanding the new administration.”

In an internal email to employees obtained by The Post, AT&T said Cohen was among “several consultants” the company hired in early 2017 “to help us understand how the President and his administration might approach a wide range of policy issues important to the company, including regulatory reform at the FCC, corporate tax reform and antitrust enforcement.”

At the time the contract was signed, AT&T was trying to build ties to the new administration. Months earlier, Trump had come out strongly against the proposed merger with Time Warner, which owns CNN — a network he often berates as “fake news.”

“As an example of the power structure I’m fighting, AT&T is buying Time Warner and thus CNN, a deal we will not approve in my administration because it’s too much concentration of power in the hands of too few,” Trump said during a speech in Gettysburg, Pennsylvania, in October 2016.

On Jan. 12, 2017, Cohen and AT&T’s chief executive, Randall Stephenson, were both seen visiting Trump Tower in New York, days before the contract with Essential Consultants was signed.

But although the two men arrived within minutes of each other, they did not meet that day and have never met, AT&T said this week.

At the time, AT&T said that Stephenson had “a very good meeting” with Trump but that the Time Warner merger “was not a topic of discussion.”

“The conversation focused on how AT&T can work with the Trump administration to increase investment in the U.S., stimulate job creation in America, and make American companies more competitive globally,” the company said.

In the wake of the revelation of Cohen’s link to AT&T, ranking Democrats on antitrust subcommittees in both the House and Senate sent a joint letter to the Justice Department’s top competition enforcer, Makan Delrahim, asking whether he knew of the company’s payments to Cohen during his agency’s independent review of the Time Warner merger.

The Justice Department declined to comment.

According to a person familiar with the matter who requested anonymity to describe ongoing litigation, Delrahim was not aware of AT&T’s payments to Cohen.

Meanwhile, Novartis chief executive Vasant Narasimhan sent an email to employees Thursday calling the company’s $1.2 million contract with Cohen a “mistake” and acknowledging that the revelation “was not a good day for Novartis.”

“We made a mistake in entering into this engagement and, as a consequence, are being criticized by a world that expects more from us,” Narasimhan wrote.

Narasimhan joined the company in 2005, but did not take the helm of the global drug giant until this February. “I was not involved with any aspect of this situation,” Narasimhan wrote to employees, adding that it had been a difficult day for himself and his family.