A senior White House national security official has been fired after being unmasked as the voice behind a Twitter account that embarrassed the Obama administration by aiming stinging criticism at government figures.

As director of nuclear non-proliferation, Jofi Joseph was helping to negotiate nuclear issues with Iran. But for more than two years, he also sent hundreds of tweets, many of them containing personal insults, using the Twitter handle @NatSecWonk.

In his Twitter biography, which has been taken down, Joseph described himself as a "keen observer of the foreign policy and national security scene" who "unapologetically says what everyone else only thinks".

In one tweet, he said: "'Has shitty staff.' #ObamaInThreeWords." In another, he made fun of the choice of husband by one of Hillary Clinton's top aide, comparing their partnership unflatteringly to two senior White House officials.

"Was Huma Abedin wearing beer goggles the night she met [former congressman] Anthony Weiner? Almost as bad a pairing as Samantha Powers and Cass Sunstein ...." he wrote.

He also offered support to Republican representative Darrell Issa in his attempts to hold former secretary of state Clinton responsible for last year's attack on the US diplomatic post in Libya.

"Look, Issa is an ass, but he's on to something here with the @HillaryClinton whitewash of accountability for Benghazi," Joseph tweeted.

He lashed out at Sarah Palin "and the rest of her white trash family" and mocked the personal appearance of a number of female figures, including Senate Republican candidate Liz Cheney and Mitt Romney's wife, Ann. Joseph also used the account to hurl abuse at journalists, including Daily Beast reporter Josh Rogin, who broke the story of his sacking. "Just a hunch, but I have the sense lots of people would like to punch @joshrogin in the face," he tweeted earlier this month.

The White House has confirmed that Joseph was fired last week but has declined to comment further.

Joseph, 40, told Politico he deeply regretted his tweets.

"What started out as an intended parody account of DC culture developed over time into a series of inappropriate and mean-spirited comments," he said in an email. "I bear complete responsibility for this affair and I sincerely apologise to everyone I insulted."

An administration official told Politico that Joseph had been about to move from White House duty to a senior role in the Pentagon.