PHOENIX — A federal judge has rejected arguments by the U.S. Department of Justice that she cannot intercede in a congressional bid to investigate how and why the agency first lied about the Operation Fast and Furious “gun walking” operation in Arizona.

Judge Amy B. Jackson said federal courts are entitled to determine whether the Obama administration is wrongfully withholding documents from a House panel looking into the now-abandoned practice of letting illegally purchased weapons make their way to Mexico. That practice came to light when “walked” guns ended up at the scene where Border Patrol Agent Brian Terry was killed in 2010.

In her ruling this week, Jackson said the fact the dispute may have political elements is legally irrelevant. Just because the fight is between two other branches of government does not deprive courts of their role in deciding who is right, she said.

“Supreme Court precedent establishes that the third branch has an equally fundamental role to play, and that judges not only may, but sometimes must, exercise their responsibility to interpret the Constitution and determine whether another branch has exceeded its power,’’ she wrote. And Jackson called the Department of Justice contentions that federal courts have no power in these disputes “flawed and selective.’’

The ruling is a setback for contentions by the Obama administration that the documents sought by Congress are privileged because they involve internal deliberations. A deputy attorney general, in a letter to Rep. Darrell Issa, R-Calif., insisted disclosure would have “significant, damaging consequences.”

Jackson’s ruling does not automatically mean that Issa’s Committee on Oversight and Government Reform will ultimately get the documents he wants. Instead, it means Jackson gets to decide if there’s a legitimate reason to keep them secret.

“This opinion does not grapple with the scope of the president’s privilege,” she wrote. “It simply rejects the notion that it is an unreviewable privilege when asserted in response to a legislative demand.”

Operation Fast and Furious began in 2009, with the Bureau of Alcohol, Tobacco, Firearms and Explosives telling weapons dealers to allow purchases to go through to “straw buyers,” those who were legally entitled to have weapons but where there was a reason to believe they were purchasing them for someone else. The goal of letting the guns “walk” was to allow ATF to follow the flow of firearms to Mexican drug cartels.

It drew public scrutiny after a 2010 firefight near Rio Rico where Terry was killed. Guns the ATF was supposed to have been tracking were recovered at the scene.

It ultimately was revealed the government lost track of more than half the 2,000-plus weapons  it was supposed to be following. And ATF officials subsequently admitted its agents are aware of 11 instances where a firearm that was supposed to be part of Fast and Furious was recovered in connection with a violent crime in this country.

When Issa’s committee first inquired, the Department of Justice responded in a February 2011 letter there was no such program. Only after extensive publicity was that letter withdrawn.

By that point, Issa’s panel wanted to know how and why the prior assurances were made. A subpoena to the Department of Justice produced about 4,000 pages of records — but virtually none from after the February 2011 letter.

Jackson said the Department of Justice arguments come down to a claim that allowing courts to intercede “would threaten the tripartite scheme of government established by the Constitution, and subvert 200 years of this country’s history.’’ But she said there is long precedent for courts to step in.

Anyway, the judge said, this case is exactly the kind of dispute courts are supposed to resolve.

“Federal courts are routinely involved in the enforcement of subpoenas, in both civil and criminal litigation, and even in administrative proceedings,’’ Jackson wrote.

Jackson said the U.S. Constitution specifically gives Congress — and its committees — the power to investigate “and its right to further an investigation by issuing subpoenas and enforcing them in court.’’

Jackson said that the ideal situation would be if the Obama administration and Congress were to work out their differences without her. But she said it is obvious from the months of negotiations that is not going to happen, requiring federal courts to step in.