Peter Bergen is CNN's national security analyst, a vice president at New America and a professor of practice at Arizona State University. He is completing a book about President Trump's national security team and policies. The opinions expressed in this commentary are his own. View more opinion articles at CNN.

(CNN) A year ago, Jamal Khashoggi, a prominent Saudi writer, entered the Saudi consulate in Istanbul to obtain paperwork so he could marry his Turkish fiancée, who was waiting for him outside the building. He was never seen again.

A contributor to the Washington Post, Khashoggi, aged 59, was a critic of the Saudi regime and was living in self-imposed exile in the United States. He was murdered inside the Istanbul consulate on October 2, 2018, by a team that was dispatched from Saudi Arabia, among them associates of the Saudi Crown Prince Mohamed bin Salman -- known as MBS -- the then-32-year-old de facto ruler of the country.

The Saudis (and MBS himself) have consistently denied that bin Salman had any direct role in Khashoggi's murder and instead have ascribed it to a rogue operation by overzealous subordinates. They charged 11 of them, five of whom face a possible death penalty, although given the opaque nature of the Saudi legal system little is clear about the yet unresolved case.

Khashoggi's murder brought into sharp focus concerns about the judgment of the young prince that had percolated for years. MBS had variously entered an ongoing war in Yemen that, according to the UN, had precipitated the worst humanitarian crisis on the planet; he had blockaded the gas-rich state of Qatar, a close American ally and the site of the most important US military base in the Middle East. Domestically, MBS had also imprisoned a host of clerics, dissidents and businessmen.

JUST WATCHED Trump: 'I'm extremely angry' about Khashoggi killing Replay More Videos ... MUST WATCH Trump: 'I'm extremely angry' about Khashoggi killing 01:49

At first it looked like Trump might distance himself from MBS. Less than two weeks after Khashoggi's murder on CBS's "60 Minutes," President Donald Trump promised "severe punishment" for the Saudis if it was proven that they had murdered Khashoggi. Khashoggi, after all, was both a legal resident of the United States and a journalist who was contributing regularly to a major American media institution.

A month later, Trump backpedaled, citing putative massive American arms sales to the Saudis. Trump told reporters , "...it's 'America First' for me. It's all about 'America First.' We're not going to give up hundreds of billions of dollars in orders, and let Russia, China, and everybody else have them ... military equipment and other things from Russia and China. ... I'm not going to destroy the economy for our country by being foolish with Saudi Arabia."

Until Khashoggi's murder, it was possible to emphasize the positive case for bin Salman, to argue that he was genuinely reforming Saudi Arabia's society and economy. He had clipped the wings of the feared religious police in the kingdom and had given women greater freedoms, such as the right to drive and a larger role in the workplace.

Bin Salman encouraged concerts and movie theaters in a society that had long banned both and he also started to end the rigid gender separation in the kingdom by, for instance, allowing women to attend sports events

He also promised a magical moment in the Middle East when the Arab states could deliver a peace deal with the Palestinians, while he was liberating his people from the stultifying yoke of Sunni Wahhabism that had nurtured so many of the 9/11 plotters. For many years, Washington had puzzled over whether Saudi Arabia was more of an arsonist or a firefighter when it came to the propagation of militant Islam. Bin Salman appeared to be a firefighter.

JUST WATCHED Wolf Blitzer presses senator over meeting with world leader Replay More Videos ... MUST WATCH Wolf Blitzer presses senator over meeting with world leader 03:46

MBS also has a somewhat plausible plan for diversifying the heavily oil-dependent Saudi economy known as Vision 2030 , to be financed in part by the sale of parts of the oil giant Aramco, which may be the world's most valuable corporation with a market value that the Saudis hope is two trillion dollars

In March 2018, MBS even visited Hollywood and Silicon Valle y, where he ditched his Arab robes in favor of a suit and where he was feted as a reformer by film stars and tech industry heavyweights.

But after Khashoggi's murder, the positive case for Mohammed bin Salman was largely submerged in the West, where he was increasingly viewed as an impetuous autocrat. In 2015, he had authorized the disastrous and ongoing war in neighboring Yemen, in which tens of thousands of civilians have been killed. He had also effectively kidnapped the Lebanese Prime Minister, a dual Lebanese-Saudi citizen, when he was on a trip to Saudi Arabia. And MBS led the blockade of his country's neighbor, gas-rich Qatar, which continues to this day.

Now Bin Salman faces what may be his most difficult foreign policy challenge yet: What to do about the drone and missile attacks earlier this month against the crown jewel of Saudi Arabia's economy, the Aramco Abqaiq oil facility, an attack the crown prince and the Trump administration have plausibly blamed Iran for. The Iranians have denied involvement in the attacks

This attack is particularly problematic for MBS, as he is also Saudi minister of defense and he has presided over a massive arms buildup, yet was not able to defend the kingdom against the missile and drone barrage that took down half of Saudi's oil capacity, at least temporarily.

JUST WATCHED Post-Khashoggi murder, why should U.S. believe anything Saudi Arabia has to say? Replay More Videos ... MUST WATCH Post-Khashoggi murder, why should U.S. believe anything Saudi Arabia has to say? 05:23

The Iranian attack also poses a quandary for President Trump, who doesn't want the United States to get embroiled in another war in the Middle East, even though he has embraced MBS as a close ally.

On Sunday, CBS's "60 Minutes" aired an interview with bin Salman in which he said that he hoped that Saudi Arabia could reach a "political and peaceful solution" with Iran

One can only hope that MBS and Trump don't launch a war against Iran, which has a large army, significant proxy forces around the Middle East and sophisticated ballistic missile systems. However, it's hard to imagine them not responding at all since the Iranians have shown they can now attack with impunity a key node of the world's energy markets.

Mohammed bin Salman may be able to preside over the murder of a dissident journalist in Turkey with relative ease, but there is little in his conduct of foreign policy hitherto to suggest that he will skillfully deal with the Iranians.