WASHINGTON — A panel of three federal appeals court judges appeared to be unreceptive Wednesday to President Donald Trump's claim that local prosecutors cannot get his financial records as long as he's in office — and heard an extreme hypothetical example making that case.

The long-standing view of the Justice Department is that a president cannot be indicted while in office. William Consovoy, Trump's lawyer, told the 2nd Circuit Court of Appeals that the immunity extends to the entire criminal justice process, including grand jury subpoenas for documents.

Manhattan's district attorney obtained a grand jury subpoena in August for three years' worth of financial records from the Trump Organization and eight year's worth of Trump-related business records — including Trump's personal tax records — from the accounting firm Mazars USA. Prosecutors are investigating whether Trump or his company broke any state laws when they reimbursed his former lawyer, Michael Cohen, for making hush money payments.

Cohen, now serving a three-year federal prison sentence, admitted to paying porn star Stormy Daniels to prevent her from publicly claiming, during the presidential campaign, that she once had a sexual relationship with Trump — an allegation he has repeatedly denied.

Carey Dunne, New York District Attorney Cy Vance Jr.'s general counsel, said the president's position is too absolute.

There could be examples in which a state should be able to conduct a criminal investigation of a sitting president, "if, for example, he did pull out a handgun and shoot someone on Fifth Avenue."

Asked about that, Consovoy said a president could be charged with such a crime once he was out of office or if he was impeached and removed from office. "This is not a permanent immunity," he said.

"I'm talking about while in office. Nothing could be done? That's your position?" Judge Denny Chin asked.

"That is correct," Consovoy said.

During the 2016 campaign, Trump first raised the scenario about what would happen if he shot someone, but not with any reference to legal immunity.

Trump said at the time: "My people are so smart. And you know what else they say about my people? The polls? They say I have the most loyal people. Did you ever see that? Where I could stand in the middle of Fifth Avenue and shoot somebody and I wouldn't lose any voters, OK? It's like incredible.”

Even assuming a president cannot be indicted, the appeals court judges questioned whether that immunity applies to earlier stages in the criminal justice process and noted that President Richard Nixon turned over White House tapes in 1974 in response to a grand jury subpoena.

Trump's legal team has also said that subjecting a president to a criminal investigation would be a distraction from his official duties. But that argument was also greeted skeptically.

"Where is the distraction if the subpoena is served on his accountants? The president doesn't have to do anything to comply with that subpoena," Chin asked.

Dunne told the court that the president's claim is too broad.

"There is no privilege for tax returns, whether it's the president or anyone else in this country," he said. "He may view them as embarrassing or sensitive. But tax returns do, in fact, get subpoenaed all the time in financial investigations."

Dunne said the district attorney is required by law to respect the confidentiality of the records it seeks and could not even turn them over if Congress asked for them.

Based on their questions, the judges seemed to be well aware that they're being asked to venture into uncharted legal territory. No court has yet ruled on the reach of presidential immunity in criminal cases.

At the end of Wednesday's courtroom argument, Judge Robert Katzmann expressed what everyone in the courtroom was undoubtedly thinking — whatever the ruling is, the case is headed to the Supreme Court.

"We have the feeling that you may be seeing each other again in Washington," he said.