Susan Rice, a former U.S. ambassador to the United Nations and U.S. national security adviser, issued a stark warning aimed at the White House on Sunday, saying the risk of war with Iran was still very real, but could be averted if President Donald Trump takes immediate control of his national security policy.

Rice, who served under President Barack Obama, wrote an op-ed published in The New York Times on Sunday, days after Trump said he abruptly called off military strikes against Iran minutes before they were set to take place. According to the president, he ordered strikes in retaliation for the downing of an American spy drone, but scuttled the attack after learning officials estimated 150 Iranians would be killed.

Rice says that she was troubled by the accounts, but that there was a “potential silver lining, if Mr. Trump truly doesn’t want war with Iran.”

“The risk of war remains real,” Rice writes. “How on earth did we find ourselves 10 minutes from an idiotic war without the president having weighed the consequences? As a former national security adviser who has participated in many decisions about whether and when to use force, I am more certain than ever that our national security decision-making process is dangerously dysfunctional.”