WATCH: Sen. Lindsey Graham threatens Trump with impeachment if he brings back waterboarding
US Senator Lindsey Graham, a candidate for the Republican Party's presidential nomination photographed on November 19, 2015, called November 29 for the creation of an international army of 100,000 troops to fight Islamic State militants in Syria (AFP Photo/Spencer Platt)

President Donald Trump's Supreme Court nominee Neil Gorsuch was grilled during his confirmation hearing on Tuesday. Sen. Lindsey Graham (R-SC) questioned Gorsuch on the president's campaign stance to bring back waterboarding, sending a warning of his own to Trump.

"You have said several times he is not above the law," Graham said in the hearing, referring to the president. "So if we have laws on the book that prevent waterboarding — do you agree with me that the Detainee Treatment Act prevents waterboarding?"

The practice was determined to be illegal under two Senate-ratified treaties, including the Senate-ratified Convention Against Torture and the Senate-ratified Geneva Conventions. Its use was also banned under the federal War Crimes Act.

Trump maintained over the course of his campaign that waterboarding is not a form of torture. In a Fox News interview with Sean Hannity, he said, "I mean, torture is real torture, OK? Waterboarding is — I'm sure it's not pleasant, but waterboarding was just short of torture. When — you know, all of a sudden, they made it torture."

The president also told ABC anchor David Muir that the practice "absolutely" works.

"In case President Trump is watching ... if you start waterboarding, you may be impeached," Graham said at Gorsuch's hearing.

Gorsuch replied, "Senator, the impeachment power belongs to this body." He added, "No man is above the law."

Watch the full exchange below.