A federal judge in Idaho urged the U.S. Supreme Court on Tuesday to rule against the National Security Agency's surveillance program of telephone records while saying his own hands are tied by legal precedent.

Judge B. Lynn Winmill, chief judge of the U.S. District Court in Idaho, dismissed a suit challenging the NSA's controversial program on Tuesday. But, in an eight-page memorandum, he said the Supreme Court should take up the issue.

Judge Winmill said there is a "looming gulf'' between a 1979 Supreme Court precedent that allowed the government to gather the phone records of a single suspect, and the NSA program that collects millions of phone records of Americans to build a searchable database, including the time, duration, and numbers dialed. The program doesn't gather the content of calls.

The judge also cited a ruling last year by U.S. District Judge Richard Leon in Washington, D.C., who concluded that the NSA program was almost certainly a violation of the Fourth Amendment of the U.S. Constitution. Although that ruling is being appealed to a higher court, other courts have ruled the program is constitutional.

Even as several legal cases over the NSA program continue to be fought, the Obama administration has pledged to end the government storage of the phone records, and instead search phone companies' records instead. Civil liberties groups think the program should be ended entirely.