A lawyer for President Donald Trump on Wednesday told a federal judge he believes his client could shoot someone on Fifth Avenue and not be charged as long as he remained in office.

Trump attorney William Consovoy‘s comments came during a court case surrounding the president’s attempt to block a subpoena from New York state prosecutors for his tax returns. Consovoy argued that a sitting president has blanket immunity from all criminal probes while in office.

Judge Denny Chin, one of three members of a panel of the 2nd U.S. Circuit Court of Appeals, asked Consovoy how far he believes presidential immunity could go and used a controversial remark Trump made during his 2016 campaign as an example.

“I could stand in the middle of Fifth Avenue and shoot somebody and I wouldn’t lose voters,” Trump famously said in January 2016.

SLIDESHOW: TOP DEMOCRATS RUNNING FOR PRESIDENT IN 2020

“What’s your view on the ‘Fifth Avenue’ example?” Chin asked Consovoy on Wednesday. “Local authorities couldn’t investigate, couldn’t do anything about it?”

“Nothing could be done, that’s your position?” the judge added.

“That is correct,” Consovoy replied after appearing to concede that “once a president is removed from office,” he could be charged by local authorities or any investigator.

“This is not a permanent immunity,” the Trump lawyer told Chin.

Carry Dunne, a lawyer with Manhattan District Attorney Cyrus Vance‘s office, first raised Trump’s quote and argued on behalf of Vance.

“You could imagine it would be necessary, or at least perhaps a good idea [to indict a sitting president] if he, for example, did pull out a handgun and shoot someone on Fifth Avenue,” Dunne said.

Dunne also noted that the Constitution does not explicitly say a sitting president enjoys executive privileges with regards to refusing to release his tax returns.

SLIDESHOW: TOP DEMOCRATS RUNNING FOR PRESIDENT IN 2020

Earlier this month, Trump lost an appeal to block a House subpoena that demanded eight years of his personal and corporate taxes from his accounting firm, Mazars USA. The 2-1 ruling came from a D.C. Appeals Court. Vance’s office also subpoenaed Mazars last month for Trump’s tax returns dating back to 2011.