NEW YORK (Reuters) - A lawyer for U.S. President Donald Trump told a federal appeals court Wednesday the president does not have to hand over his tax returns to New York state prosecutors because he is immune from criminal investigation.

William Consovoy, an attorney for the president, told the 2nd U.S. Circuit Court of Appeals that Trump has immunity until he leaves office and said prosecutors would not even have the power to do anything if Trump shot someone on 5th Avenue in New York City.

The remark echoed a past comment by Trump, who has said his supporters are so loyal that he could shoot someone on 5th Avenue and not lose a single vote.

The case, which pits Manhattan District Attorney Cyrus Vance against Trump, is one of several legal battles in which the Republican president is seeking to shield his personal finances from scrutiny.

In August, Vance, a Democrat, subpoenaed Trump’s personal and corporate tax returns from 2011 to 2018, and other records from the president’s longtime accounting firm Mazars USA. The subpoena is part of a criminal probe into Trump and his family business. The scope of that probe is not publicly known.

Trump sued Vance’s office in Manhattan federal court to block the subpoena, arguing that as a sitting president, he cannot be subject to criminal investigation.

“We view the entire subpoena as an inappropriate fishing expedition not made in good faith,” Consovoy, a lawyer for Trump, told the three-judge panel on Wednesday.

Circuit Judge Denny Chin asked Convoy if authorities would be powerless to do anything if Trump shot someone.

“That’s correct,” Consovoy replied, adding that immunity would end if Trump were removed from office.

Manhattan District Attorney Cyrus R. Vance Jr. arrives at the United States Courthouse, for an appeals hearing regarding U.S. President Donald Trump's personal and corporate tax returns, in the Manhattan borough of New York City, October 23, 2019. REUTERS/Shannon Stapleton

Carey Dunne, a lawyer for prosecutors, urged the judges to reject Trump’s argument.

“There’s no such thing as presidential immunity for tax returns,” said the attorney Carey Dunne.

Dunne assured the court that if Vance’s office obtained the tax returns, they would be kept confidential.

“This case seems bound for the Supreme Court,” Chief Judge Robert Katzmann said toward the end of the argument.

Earlier this month, a federal appeals court in Washington backed an effort by a House Oversight Committee to obtain Trump’s financial records from Mazars.

The 2nd Circuit has put U.S. District Judge Victor Marrero’s Oct. 7 order on hold until it considers the case. Vance’s office has agreed not to enforce its subpoena for 10 days if the court rules in its favor, to give Trump time to appeal to the U.S. Supreme Court.

The U.S. Department of Justice has weighed in on the case, arguing that Vance must make a “heightened and particularized showing” that he needs the documents for his investigation.

Though the Department stopped short of saying Vance could not get the returns under any circumstances, it said it was “unlikely” he could demonstrate an immediate need for them because the U.S. Constitution bars states from prosecuting a sitting president.

Vance’s investigation comes amid an impeachment inquiry and investigations into Trump’s finances by Democrats in the U.S. House of Representatives.

Two House committees are seeking to obtain Trump’s financial records from Deutsche Bank AG and Capital One Financial Corp. The 2nd Circuit is currently considering a lawsuit by Trump to block them from getting those records, which do not include his tax returns.

The House impeachment inquiry focuses on the president’s request in a July phone call for Ukrainian President Volodymyr Zelenskiy to investigate Democratic former vice president Joe Biden, a key Trump rival and a top contender for the 2020 Democratic presidential nomination.