“Official Secrets,” which opened Friday in New York and Los Angeles, is the best movie ever made about how the Iraq War happened. It’s startlingly accurate, and because of that, it’s equally inspiring, demoralizing, hopeful, and enraging. Please go see it.

It’s been forgotten now, but the Iraq War and its abominable consequences — the hundreds of thousands of deaths, the rise of the Islamic State group, the nightmare oozing into Syria, arguably the presidency of Donald Trump — almost didn’t happen. In the weeks before the U.S.-led invasion on March 19, 2003, the American and British case for war was collapsing. It looked like a badly made jalopy, its engine smoking and various parts falling off as it trundled erratically down the road.

For this brief moment, the George W. Bush administration appeared to have overreached. It would be extremely tough for the U.S. to invade without the U.K., its faithful Mini-Me, at its side. But in the U.K., the idea of war without approval from the United Nations Security Council was deeply unpopular. Moreover, we now know that Peter Goldsmith, the British attorney general, had told Prime Minister Tony Blair that an Iraq resolution passed by the Security Council in November 2002 “does not authorise the use of military force without a further determination by the Security Council.” (The top lawyer at the Foreign Office, the British equivalent of the U.S. State Department, put it even more strongly: “To use force without Security Council authority would amount to the crime of aggression.”) So Blair was desperate to get a thumbs-up from the U.N. Yet to everyone’s surprise, the 15-country Security Council remained recalcitrant.

On March 1, the U.K. Observer threw a grenade into this extraordinarily fraught situation: a leaked January 31 email from a National Security Agency manager. The NSA manager was demanding a full court espionage press on the members of the Security Council — “minus US and GBR of course,” the manager jocularly said — as well as non-Security Council countries who might be producing useful chatter.

What this demonstrated was that Bush and Blair, who had both said they wanted the Security Council to hold an up or down vote on a resolution giving a legal stamp of approval for war, were bluffing. They knew they were losing. It showed that while they claimed they had to invade Iraq because they cared so much about upholding the effectiveness of the U.N., they were happy to pressure fellow U.N. members, up to and including the collection of blackmail material. It proved the NSA plan was unusual enough that, somewhere in the labyrinthine intelligence world, someone was upset enough that he or she was willing to risk going to prison for a long time.

That person was Katharine Gun.

Played craftily in “Official Secrets” by Keira Knightley, Gun was a translator at the General Communications Headquarters, the British equivalent of the NSA. On one level, “Official Secrets” is a straightforward, suspenseful drama about her. You learn how she got the email, why she leaked it, how she did it, why she soon confessed, the horrendous consequences she faced, and the unique legal strategy that forced the British government to drop all charges against her. At the time, Daniel Ellsberg said her actions were “more timely and potentially more important than the Pentagon Papers … truth-telling like this can stop a war.”

On a subtler level, the film asks this question: Why didn’t the leak make a true difference? Yes, it contributed to opposition to the U.S. and U.K. on the Security Council, which never voted on another Iraq resolution, because Bush and Blair knew they would lose. Yet Blair was able to shrug this off and obtain a vote by the British Parliament several weeks later endorsing his war.

There is one main answer to this question, both in “Official Secrets” and reality: the U.S. corporate media. “Official Secrets” helps illustrate the ideological malfeasance by the American press, which eagerly jumped on this grenade to save its foxhole buddies in the Bush administration.

It’s easy to imagine a different history than the one we’ve lived. British politicians, like American ones, are loath to criticize their intelligence agencies. But serious follow-up on the Observer story by the elite U.S. media would have generated attention from members of the U.S. Congress. This in turn would have opened up space for British members of Parliament opposed to an invasion to ask what on earth was going on. The rationale for war was disintegrating so quickly that even some modest delay could easily have become indefinite postponement. Bush and Blair both knew this, and it’s why they pushed ahead so relentlessly.

But in this world, the New York Times published literally nothing about the NSA leak between the date of its publication in the U.K. and the start of the war almost three weeks later. The Washington Post placed a single 500-word article on page A17. Its headline: “Spying Report No Shock to U.N.” The Los Angeles Times similarly ran one piece before the war, the headline of which explained, “Forgery or no, some say it’s nothing to get worked up about.” This article gave space to the former counsel of the CIA to suggest that the email was not real.

This was the most fruitful line of attack on the Observer’s story. As “Official Secrets” shows, American television was initially quite interested in putting one of the Observer reporters on air. These invitations quickly evaporated as the Drudge Report splashed claims that the email was obviously fake. Why? Because it used British spellings of words, such as “favourable,” and hence couldn’t have been written by an American.

In reality, the original leak to the Observer used American spellings, but before publication the paper’s support staff had accidentally changed them to British versions without the reporters noticing. And as usual when faced with an attack from the right-wing, television networks in the U.S. cowered in abject terror. By the time the spelling minutiae was straightened out, they’d sprinted a thousand miles away from the Observer’s scoop and had zero interest in revisiting it.

The little attention the story got was largely thanks to the journalist and activist Norman Solomon, and the organization he founded, the Institute for Public Accuracy, or IPA. Solomon had traveled to Baghdad just months before and co-written the book “Target Iraq: What the News Media Didn’t Tell You,” which came out in late January 2003.

Today, Solomon remembers that “I felt instant kinship — and, actually, what I’d describe as love — for whoever had taken the enormous risk of revealing the NSA memo. Of course, at the time I was clueless about who’d done it.” He soon penned a syndicated column titled “American Media Dodging U.N. Surveillance Story.”

Why hadn’t the paper of record covered it, Solomon asked Alison Smale, then a deputy foreign editor at the New York Times. “It’s not that we haven’t been interested,” Smale told him. The problem was that “we could get no confirmation or comment” about the NSA email from U.S. officials. But “we are still definitely looking into it,” said Smale. “It’s not that we’re not.”

The Times never mentioned Gun until January 2004, 10 months later. Even then, it didn’t appear in the news section. Instead, thanks to urging from IPA, Times columnist Bob Herbert looked into the story, and, perplexed that the news editors had passed, took it on himself.

Now, at this point you may want to collapse from despair. But don’t. Because here’s the unbelievable rest of the story — something so complex and improbable that it doesn’t appear in “Official Secrets” at all.