LONDON — Prime Minister Theresa May on Wednesday fired her defense secretary, Gavin Williamson, for allegedly playing a role in leaking details from a meeting about Britain’s willingness to work with Chinese telecom giant Huawei.

The abrupt sacking of Britain’s top defense official — over allegations by the prime minister that Williamson had breached the secrecy protocols of the National Security Council — was stunning. For a top government minister to be canned over such a leak is almost unprecedented in Britain.

Williamson denied any involvement in the unauthorized disclosure.

The British political press quickly focused on the “Game of Thrones” atmosphere in May’s fractious government, stoked by open divisions over Brexit and by May’s weak leadership.

Williamson is one of the many aspirants to replace May, who is seen as especially vulnerable over her failure to deliver a European Union exit plan. Whether she resigns in the coming months, as she has indicated she might do, or is ousted more quickly, is a point of debate.

After an April 23 meeting of Britain’s National Security Council, attended by intelligence chiefs and senior cabinet ministers, a story appeared on the front page of the Daily Telegraph that claimed May had decided to permit Huawei to play a leading role in building Britain’s 5G Internet — despite intense pressure from the United States to ban Huawei as a security risk.

Huawei is one of the world’s largest communications conglomerates, manufacturing mobile phones, tablets and computers — and assembling the software, routers and networks to operate WiFi and high-speed Internet.

But U.S. officials have been warning allies that Chinese cyberspies could tap user data through backdoor access.

Huawei has denied the accusations that its networking equipment could be used to spy. But revelations about U.S. tech companies and their abilities to harvest user data have increased suspicions about what the Chinese could do if they were operating the switches.

In a letter to Williamson on Wednesday, May wrote that an investigation into the leaks provided “compelling evidence suggesting your responsibility for the unauthorized disclosure.”

“No other, credible version of events to explain this leak has been identified,” May added.

In his reply, Williamson wrote: “I strenuously deny that I was in any way involved in this leak and I am confident that a thorough and formal inquiry would have vindicated my position.”

Williamson became defense secretary in late 2017, after Michael Fallon left the role following allegations of inappropriate behavior toward women. 

In his previous role as chief whip, Williamson kept a tarantula on his desk called Cronus.

Williamson was replaced on Wednesday evening by Penny Mordaunt. She is Britain’s first female defense secretary.