LONDON—It wasn’t touching a journalist’s knee or the pornography on his office computer that ultimately ended the career of Britain’s deputy prime minister. As is traditional in these slow-moving political scandals, it was the cover-up that did for him.

Damian Green was fired on Wednesday night by one of his oldest and dearest friends, British Prime Minister Theresa May.

He was caught up by the sweeping #MeToo movement at the end of October when journalist and young Conservative party activist Kate Maltby came forward to say she had been the target of unwanted advances by the Cabinet minister on two occasions.

Despite the mood in the wake of the Harvey Weinstein scandal, May was in no hurry to get rid of him.

Next, police officers leaked details from a criminal investigation launched a decade earlier in which a large quantity of pornographic material had been inadvertently discovered on the computer in Green’s parliamentary office.

Still May stood by him.

She first met Green while they were students at Oxford University and they remained close. For four years, they worked together in the same government department, and when May narrowly won this year’s election it was no surprise that she turned to one of the men she trusted most to become her de facto deputy.

She was finally forced to oust him Wednesday, however, when a Cabinet Office inquiry concluded that Green had misled the public when he claimed to know nothing about the porn.

He maintains that it wasn’t he who downloaded the material, but he now accepts that he was told about its discovery at the time. Even in the Trump era, Britain has retained the old-fashioned standard that a politician caught making a misleading statement must step down.

Sir Jeremy Heywood, who conducted the inquiry, also said Maltby’s allegations against Green were “plausible” but said “it is not possible to reach a definitive conclusion” about what happened between them.

“ I deeply regret the distress caused to Kate Maltby following her article and the reaction to it. ” — Damian Green

Maltby chose not to respond immediately to the dismissal, but her parents, Colin and Victoria, who were previously friends of Green, released a statement. “We are not surprised to find that the inquiry found Mr Green to have been untruthful as a minister, nor that they found our daughter to be a plausible witness,” they said.

“We have received many supportive messages from people near and far who appreciate Kate’s courage and the importance of speaking out about the abuse of authority. We join with them in admiring her fortitude and serenity throughout the length of the investigation and despite the attempted campaign in certain sections of the media to denigrate and intimidate her and other witnesses. We are proud of her.”

It was the Daily Mail’s efforts to smear Maltby in two articles under the banner headline “One Pushy Lady” that most likely attracted the attention of her parents. It was suggested that Maltby was “poison” and “not afraid to use all her charms to get herself noticed.”

In an article in The Times, she had accused Green of touching her knee at a dinner in 2015 and sending her a suggestive text message the following year. In the same piece, she explained that she did not think this was a monstrous attack. “Let me be clear. This is not the most terrible thing that has ever happened to a woman,” she wrote, before explaining that she felt awkward, embarrassed, and professionally compromised by the interaction.

Green apologized to Maltby in his resignation letter published on Wednesday night. “I deeply regret the distress caused to Kate Maltby following her article and the reaction to it. I do not recognize the events she described in her article, but I clearly made her feel uncomfortable and I apologize.”