WASHINGTON (Reuters) - CIA Director John Brennan said on Wednesday he would resign if the next president ordered his agency to resume waterboarding suspected militants, an apparent reference to comments by Republican presidential candidate Donald Trump embracing the banned interrogation method.

“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,” said Brennan, who did not mention Trump by name.

Brennan, who has been director since 2013, tacked his comment to the end of his response to a question about drone strike policy after speaking at the Brookings Institution, a Washington policy institute.Brennan said previously he would refuse to resume the practice, which simulates drowning and was used by the CIA on three suspected militants detained in secret foreign prisons during President George W. Bush’s administration.

But his pledge to resign if ordered to revive waterboarding was his most emphatic affirmation of his position to date.

Trump, set to be formally nominated next week as the Republican nominee for the Nov. 8 election, has said he would reauthorize waterboarding immediately if elected, contending that “torture works.”

At an April 20 rally in Indianapolis, he recalled being asked about waterboarding during a debate the previous week.

“They asked me: ‘What do you think about waterboarding, Mr. Trump?’ I said I love it. I love it, I think it’s great. And I said the only thing is, we should make it much tougher than waterboarding,” he said.

Democratic President Barack Obama signed an executive order after taking office in January 2009 that banned waterboarding and other “enhanced interrogation techniques,” or EITs. Such executive orders can be rescinded by a president’s successors.

Obama, other top U.S. officials, many lawmakers and human rights groups have denounced waterboarding as torture.

Some former Bush administration and CIA officials have defended waterboarding and other EITs, denying they are torture and saying they elicited valuable intelligence.

Brennan told his confirmation hearing in 2013 he had not tried to stop harsh interrogation techniques such as waterboarding when he was at the spy agency earlier in his career, but had objected to them privately.

A Senate Intelligence Committee study, issued in 2014, concluded that EITs failed to elicit any significant intelligence.

Brennan said on Wednesday it was not possible to “establish cause and effect” between the use of EITs and the acquisition of reliable information.