John Gilmore, a tech-industry millionaire and privacy advocate, set out two years ago to challenge a basic element of airline security.

On July 4, 2002, he refused to show a photo identification when checking in at Oakland, Calif., for a flight to Baltimore on Southwest Airlines. The same day, he declined United Airline's demand to present an ID for a flight from San Francisco to Washington. In both instances, Gilmore, 49, was prohibited from boarding and was informed by the airlines that a federal security rule required passengers to show an ID in order to fly.

However, no airline employee could cite the rule.

Gilmore sued several government agencies and the airlines, claiming the ID requirement infringes on Americans' right to travel freely. The lawsuit, Gilmore v. Ashcroft, has forced the government to defend the existence of secret security rules that apply to millions of travelers.

The Bush administration said in court filings that it cannot discuss the ID rule because it is outlined in a document that the Transportation Security Administration deems "security sensitive information." For that reason, the government has petitioned the U.S. Court of Appeals for the 9th Circuit to file its documents so that they not be made public. The court is expected to make a decision soon.

"We had never heard of the government asking to submit secret briefs . . . when it wasn't based on some secret criminal investigation that needed to be protected," said Susan E. Seager, an attorney who filed a friend-of-the-court brief on behalf of media organizations including the Associated Press, McClatchy Newspapers Inc. and Los Angeles Times Communications LLC.

The news organizations weighed in on the case to keep the court proceedings open to the public, Seager said. "It's highly important that the court address the issue of secrecy and to do so in an open court," Seager said. "Otherwise, it will open the door for the government to ask for all kinds of secret proceedings."

The federal government's requirement for passengers to show a government ID for air travel is relatively new. In the mid-1990s, the Federal Aviation Administration issued a secret temporary order, or "security directive," to airlines that instructed them to request a photo ID from passengers. If passengers did not have an ID, they usually could still fly, but they often had to undergo additional security procedures.

After the terrorist attacks in 2001, the TSA issued a new order directing airlines to require, not just request, an ID before boarding a flight. Until recently, however, it was unclear whether that order existed.

In court documents, the U.S. government at first said it could not confirm whether there was a security directive requiring passengers to show ID. In an about-face, the government last month acknowledged that the order existed in a new court filing. As it turns out, the order was mentioned in an obscure maritime security rule published in May 2004.

If Gilmore succeeds in forcing the government to disclose what its secret law says, other attorneys worry it would set a dangerous precedent that could harm efforts to combat terrorism.

"Courts are justifiably going to defer to the compelling national security interest" of the government, said Kenneth P. Quinn, former FAA general counsel. "Most Americans understand the need for secrecy for security sensitive rules."

Much of Gilmore's case was dismissed by the U.S. District Court for the Northern District of California in March 2004. On appeal, a commissioner for the U.S. Court of Appeals for the 9th Circuit ruled on Sept. 10 against the government's motion to file documents under seal. The court is now considering a government appeal of that ruling.

A spokesman for the Department of Justice, which is handling the government's case, declined to comment.

Gilmore, a balding man with a long beard who wears tie-dyed socks and Birkenstocks, has brought the lawsuit in accordance with his civil libertarian views, according to his attorney, James P. Harrison. Gilmore, one of the first employees of Sun Microsystems Inc., founded another tech company that sold for several hundred million dollars. He serves as a director of the Electronic Frontier Foundation, which supports Internet and electronic communications privacy rights, Harrison said.

"My hat's off to him for actually not going out and buying an island somewhere and putting his feet up. He's a patriot," said Harrison, who represents a client in Alaska who is also suing the government on the "right to travel" issue.