Joseph Wilson, who has died aged 69 of organ failure, was the American diplomat whose first-hand questioning of the rationale behind the 2003 invasion of Iraq earned him the enmity of the George W Bush administration and saw his wife Valerie Plame’s identity as a CIA operative exposed publicly in retaliation.

In 2002, with the administration building its case for war with Iraq, the CIA sent Wilson, usually known as “Joe”, to investigate whether the Iraqis had sought to buy yellowcake uranium ore, which might be enriched for use in nuclear weapons, from Niger.

He seemed an obvious choice. Not only had his first diplomatic posting been to Niger, but he had also been deputy chief of mission at the US embassy in Baghdad during the Iraqi invasion of Kuwait in 1990, and the last American to negotiate face to face with Saddam Hussein before that embassy was closed.

When Saddam threatened execution for those harbouring foreigners in Baghdad, Wilson, already giving shelter to around 60 civilians, showed up at a press conference with a noose around his neck, saying: “If the choice is between allowing American citizens to be taken hostage, or execution, I will bring my own fucking rope.”

Joe Wilson and his wife, Valerie Plame, in 2006. Photograph: Lawrence Jackson/AP

After eight days in Niger, Wilson concluded there was no evidence that Iraq had acquired uranium, and that even a request by the Iraqis for a meeting with the Niger prime minister to discuss expanding commercial relations had been rebuffed rather than violate UN sanctions against Iraq. He later met Bush at the White House, where the president impressed him by inquiring about his perceptions of Saddam, whom Wilson called “a thug”, and of the Iraqi people.

But in his State of the Union address in January 2003, Bush referred to British intelligence that Iraq had “recently sought significant quantities of uranium in Africa”. The invasion proceeded in March, and in July, after no weapons of mass destruction were found in Iraq, Wilson wrote an opinion piece in the New York Times, What I Didn’t Find in Africa, concluding “some of the intelligence … was twisted to exaggerate the Iraqi threat”.

His language echoed that of Sir Richard Dearlove, the head of MI6, in the 2002 Downing Street memo, which did not become public until 2005, who said “the intelligence and facts were being fixed around the policy” (of military action). The day after the opinion piece appeared, when the White House press secretary Ari Fleischer was asked if the State of the Union assertion was wrong, as Wilson claimed, he replied “That’s what we’ve acknowledged”, although of course the administration never had.

Reaction to Wilson’s whistleblowing was intense, and he came under heavy fire, accused of political bias or incompetence. A furious vice-president Dick Cheney asked in a White House meeting whether Wilson’s wife “had sent him on a junket”. Plame was a CIA analyst who worked on nuclear weapons issues and was involved in investigating the aluminium tubes Iraq had acquired from Jordan, ostensibly for use in creating WMDs. A week after Wilson’s article was published, the rightwing columnist Robert Novak revealed Plame was a CIA agent, an act that can be deemed unlawful in the US.

Naomi Watts and Sean Penn playing Valerie Plame and Joe Wilson in the film Fair Game, 2010. Photograph: Moviestore/Rex/Shutterstock

The resulting investigation focused on the presidential adviser Karl Rove and Lewis “Scooter” Libby, chief of staff to Cheney. Although Novak would eventually reveal his main source was Richard Armitage, a deputy to the secretary of state Colin Powell, Libby was convicted of obstructing justice and lying to the FBI. Bush, having promised the leakers would be punished, eventually commuted Libby’s sentence, but to Cheney’s irritation did not pardon him. Libby finally got his pardon from Donald Trump in 2018. A civil suit filed by Wilson and Plame against Cheney, Rove, Libby and Armitage was eventually dismissed in federal courts on the grounds they lacked jurisdiction.

But the affair propelled the Wilsons briefly into the celebrity spotlight. Wilson told his story in a 2004 book, The Politics of Truth, while Plame published Fair Game in 2007, despite a legal battle with the CIA over its content. The two books formed the basis of Fair Game, a 2010 film starring Sean Penn as Wilson and Naomi Watts as Plame. In his book, Wilson, speaking of the American dead in Iraq, wrote: “The act of war is the last option of a democracy, taken when there is a grave risk to our national security … We have a duty to ensure that their sacrifice came for the right reasons.”

Wilson was born in Bridgeport, Connecticut, but grew up in California, the son of Joseph and Phyllis (nee Finnell). They were both journalists, and as a child Joe spent much time in Europe as his parents tried to live the writer’s life. He graduated from the University of California at Santa Barbara in 1971, and in keeping with that school’s reputation described himself as a “surf dude”.

He married his college sweetheart, Susan Otchis, and worked in various jobs until taking the US foreign service exam and, in 1976, receiving his first posting to Niger, which was followed by work in Togo, South Africa and Burundi. In the mid‑1980s he worked as a congressional fellow, assigned to then senator Al Gore and representative Tom Foley, both Democrats, which would be used against him after he challenged the Bush version of Iraq.

Wilson’s first marriage ended in divorce, and in 1986 he married Jacqueline Giorgi, a French diplomat who had served in Africa.

After his stint in Baghdad ended with the 1991 Gulf war, he was named ambassador to Gabon and São Tomé and Príncipe, and then served as a political adviser to the commander of US forces in Europe. He ended his service as a senior adviser to President Bill Clinton, whose casual style matched Wilson’s own, and as director of African affairs for the National Security Council.

In 1998 he started his own consulting business, and later worked with an investment firm as an adviser on African politics. His second marriage ended in divorce in 1998, and he married Plame that year; they divorced in 2017.

Wilson is survived by his children, two sets of twins, Sabrina and Joseph, from his first marriage, and Trevor and Samantha, from his marriage to Plame.

• Joseph Charles Wilson, diplomat, born 6 November 1949; died 27 September 2019