(CNN) New York Mayor Bill de Blasio said Thursday that President Donald Trump would be arrested if he shot someone on Fifth Avenue, rebuffing arguments made in court this week by Trump's lawyer, who said the President couldn't even be charged with murder while in office.

"If anybody shoots someone, they get arrested," de Blasio told reporters. "I don't care if they're the President of the United States or anybody else. If you shoot someone, you should get arrested, and we would arrest him."

The hypothetical situation came up during a federal appeals court hearing Wednesday about Trump's tax returns . Trump's lawyers argued that long-standing Justice Department guidelines against indicting a sitting president mean he's immune from federal and state investigations.

Therefore, Trump couldn't be charged with murder if he killed someone -- until after he leaves office. Trump lawyer William Consovoy agreed with the statement that "nothing could be done."

During the 2016 campaign, Trump infamously said he could shoot someone on Fifth Avenue and still get elected. Those comments were invoked during the appeals hearing by a lawyer representing the Manhattan District Attorney's Office, who had subpoenaed Trump's tax returns.

Read More