AT&T said late Wednesday it was contacted by special counsel Robert Mueller's office about Michael Cohen, the personal lawyer for President Donald Trump.

A spokeswoman for the company said that AT&T provided all information requested by Mueller's office in November and December of last year.

"A few weeks later, our consulting contract with Cohen expired at the end of the year. Since then, we have received no additional questions from the Special Counsel's office and consider the matter closed," AT&T said in its statement.

Earlier Wednesday, a source told CNBC that the telecommunications giant paid Cohen up to $600,000 as part of a consulting contract to get insight into Trump's thinking. The source said that the payment to Cohen was for "actual work done," adding: "And it wasn't to pay for access to the president."

"It was to pay for an understanding of the inner workings of Trump, his thought process, how he likes to operate, how he likes to make decisions, how he processes information," the source said.

"And how he thinks about the big issues," the source added.

AT&T told employees Wednesday in a memo that it had hired Cohen as one of several consultants 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&T is trying to buy media conglomerate Time Warner for $85 billion. The Justice Department opposes the deal on antitrust grounds, and now the companies are awaiting a verdict from a federal judge.