CIA director John Brennan on Wednesday vowed to resign if he was ordered by the next president to have the CIA resume waterboarding detainees—but the agency could still take up the practice.

“If a president were to order, order the agency to carry out waterboarding or something else, it’ll be up to the director of CIA and others within CIA to decide whether or not that, that direction and order is something that they can carry out in good conscience,” Brennan said, according to The Intercept.

“I can say that as long as I’m director of CIA, irrespective of what the president says, I’m not going to be the director of CIA that gives that order. They’ll have to find another director,” he added, according to Reuters.

The remarks were presumably a response to presumptive Republican presidential nominee Donald Trump’s past declarations of support for the torture method condemned by rights groups. They came at the end of a speech the CIA chief gave at the Brookings Institution.

The Intercept observed that Brennan “did not acknowledge that Congress last year turned Obama’s anti-torture executive order into law, explicitly banning waterboarding and other forms of torture—and restricting the CIA in particular to interrogation methods listed in the Army Field Manual.”

SCROLL TO CONTINUE WITH CONTENT