A conservative gadfly lawyer who has made a career of skewering Democratic administrations is taking his battle against the National Security Agency’s telephone surveillance programme to a federal appeals court.

Activist attorney Larry Klayman won the first round in December, when the US district judge Richard Leon, a Republican appointee, ruled that the NSA’s surveillance programme probably runs afoul of the US constitution’s ban on unreasonable searches. The government appealed.

In court filings in preparation for Tuesday’s argument, the Justice Department told three Republican-nominated appeals judges that collecting the phone data is of overriding and compelling importance to the nation’s security.

The former NSA systems analyst Edward Snowden revealed the phone data collection effort a year and a half ago, triggering a debate over privacy rights and surveillance.

In New York, the US court of appeals for the second circuit recently heard arguments in an appeal of a judge’s opinion that found the surveillance programme legal.

The three appeals judges in the Washington case have generally come down on the government’s side on national security issues.

Appeals judge David Sentelle permitted the George W Bush administration to withhold names and other details about hundreds of foreigners detained in the months after the 11 September 2001, terrorist attacks. Appeals judge Stephen Williams upheld the military tribunals set up by the Bush administration to try terrorism suspects for war crimes. Janice Rogers Brown ruled that four British citizens had no right to sue Pentagon officials over accusations that the detainees were tortured and their religious rights violated while held at the US detention centre at Guantánamo Bay, Cuba.

Sentelle and Williams were nominees of President Ronald Reagan. Brown was nominated by President George W Bush.

Since 2006, the FBI has obtained orders from the secret Foreign Intelligence Surveillance Court directing phone companies to produce telephone “metadata” – outgoing phone numbers dialled and numbers from incoming calls – to the government. The NSA consolidates the records into a searchable database in the hunt for suspected terrorists.

The government is using a 35-year-old supreme court ruling as the legal underpinning for the NSA’s phone data surveillance programme. In Smith v Maryland, police asked a phone company to install a device to monitor numbers that a robbery suspect had dialled. The court ruled that the suspect had no expectation of privacy for the dialled phone numbers.

The Smith case does not fit today’s reality, Klayman wrote in recently filed court papers. The bulk collection effort covers “every aspect of our lives”, he wrote.

Klayman is using a recent supreme court opinion, Riley v California, in his challenge to the surveillance programme.

In that unanimous supreme court ruling in June, Chief Justice John Roberts said police generally may not search the cellphones of people they arrest without first getting search warrants.

Klayman says that ruling “clearly lays the foundation” for what is to come in the NSA surveillance case – that past decisions analysing unlawful police and government searches “do not apply to the unconceivable circumstances of today”.

“It is the new law of the land,” Klayman wrote.

In response, the Obama administration says the impact of the Smith case has not been altered by changes in technology or by the supreme court’s Riley decision. That ruling involves unrestricted police inspection of private information on cellular phones obtained in arrests, says the government.

In contrast, the NSA surveillance case involves the acquisition of business records of telecom companies containing metadata that individuals have provided to the companies, the government argues. The metadata is accessible to government personnel “only under highly restricted” court-supervised conditions, the administration says.