British Prime Minister Theresa May’s most senior minister, Damian Green, has resigned at her request after an internal investigation found that he had made misleading comments about pornography found on computers in his parliamentary office.

The resignation of one of her most trusted allies, who helped pacify her deeply divided party, is a serious blow for May as she navigates the final year of tortuous Brexit negotiations before Britain’s exit in March 2019.

Green was appointed in the wake of her disastrous bet on a June snap election which lost her party its majority in parliament. Green, an old friend, was brought in to stabilize her leadership and counter enemies within the Conservative Party who wanted her to quit.

A review by the cabinet secretary found that Green’s statements which suggested he was not aware that indecent material was found in 2008 on parliamentary computers in his office, were “inaccurate and misleading.”

“I regret that I’ve been asked to resign from the government following breaches of the Ministerial Code, for which I apologize,” Green said in a letter to May. He added that he did not download or view pornography on his parliamentary computers.