Scott Pruitt resigned as EPA chief Thursday after White House Chief of Staff John Kelly delivered a message from the president that it was time for the scandal-plagued administrator to leave, according to two people familiar with the situation.

Pruitt didn’t want to leave his post and was described as being devastated that he had to resign, said the people, who asked not to be named discussing a personnel matter.

President Donald Trump wanted Pruitt to leave, after revelations that the administrator’s public schedule had been altered to shield some meetings from public view, they said. Doctored schedules — which could be a criminal violation of the Federal Records Act — were effectively the final straw after a tenure marred by alleged ethical missteps. The administration knew that more damaging reports would emerge soon, one of the people said.