​WASHINGTON — Borrowing a line from his client, Rudy Giuliani argued Sunday that the president could not be indicted — not even if he fired a gun at​ ​his former FBI chief.

“If he shot James Comey, he’d be impeached the next day,” Giuliani told HuffPost. “Impeach him, and then you can do whatever you want to do to him.”

But while the president is in office, Giuliani insisted, his constitutional powers are too broad. “In no case can he be subpoenaed or indicted,” Giuliani argued.

“I don’t know how you can indict while he’s in office,” he added. “No matter what it is.”

Giuliani’s use of Comey being shot as his example alluded to a comment candidate Trump famously made in January 2016 when boasting about his voter base.

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

The ex-mayor’s comments come after the New York Times revealed the existence of a 20-page letter sent by Trump’s legal team to special counsel Robert Mueller arguing that the president can’t obstruct an investigation because he has the power to “terminate” it and can “exercise his power to pardon.”

While the note pre-dated Giuliani’s time on Trump’s legal team, the high-profile talker made the rounds on the Sunday shows, saying the president could “probably” pardon himself. Legal experts are split on the issue.

As far as a presidential indictment is concerned, legal experts generally agree a president can be indicted, but as Giuliani pointed out, it’s the “when” that matters — with some believing it would have to take place once a president left office. Impeachment is considered the first defense.

“The answer was always the political process,” explained Samuel Morison, a lawyer who formerly worked in the Justice Department’s Office of the Pardon Attorney, who explained that the “impeachment clause” was considered a check against the president’s broad pardoning power that an executive could use to free his associates and friends.