WASHINGTON — A federal judge blocked AT&T’s move to obtain communication logs between the Justice Department and the White House on Tuesday, hampering the phone giant’s argument that politics played a role in the government’s decision to halt a merger with Time Warner.

Judge Richard J. Leon of United States District Court in Washington, who is overseeing a trial over the deal, said AT&T did not sufficiently show in pretrial discussions that it was treated differently from other companies.

“Defendants have fallen far short of establishing that this enforcement action was selective,” Judge Leon said.

The decision puts a crimp in AT&T’s defense for its $85 billion proposed merger with Time Warner. And it is a big win for the Justice Department, which would like to avoid attention on the role of politics in its decision to stop the deal. The merger would transform the media landscape by combining a television and movie giant with one of the nation’s biggest media distributors.