White House Chief of Staff John Kelly John Francis KellyMORE joked on Thursday that he didn’t want to leave his position at the Department of Homeland Security (DHS), but “God punished me.”

“The last thing I wanted to do was walk away from one of the great honors of my life, being the secretary of Homeland Security, but I did something wrong and God punished me, I guess,” Kelly said at an event marking DHS’s 15th anniversary.

President Trump Donald John TrumpBiden leads Trump by 36 points nationally among Latinos: poll Trump dismisses climate change role in fires, says Newsom needs to manage forest better Jimmy Kimmel hits Trump for rallies while hosting Emmy Awards MORE in July 2017 appointed Kelly as his chief of staff, moving him to the White House from his position at Homeland Security.

Kelly said he felt he had “no right” to sit on stage with other former DHS leaders, and told the crowd of department staffers he missed them “every day.”

ADVERTISEMENT

"I wish I had worked harder in the six months I had in the job to not only better protect the men and women that get beat up so badly every day, but to really advertise in a much more effective way how good you are," Kelly said.

Kelly, a retired Marine general, was appointed to lead DHS in January 2017, but only served in that role for six months before he was tapped to replace Reince Priebus Reinhold (Reince) Richard PriebusLeaked audio shows Trump touted low Black voter turnout in 2016: report Meadows joins White House facing reelection challenges Trump names Mark Meadows as new chief of staff MORE at the White House.

Speculation has swirled at times that Kelly would quit or be fired, and he would be one in a double-digit line of staffers leaving the White House amid tensions with the president. Trump has consistently praised Kelly for doing a "fantastic job," including as recently as January.

"Thank you to General John Kelly, who is doing a fantastic job," he tweeted.

Thank you to General John Kelly, who is doing a fantastic job, and all of the Staff and others in the White House, for a job well done. Long hours and Fake reporting makes your job more difficult, but it is always great to WIN, and few have won more than us! — Donald J. Trump (@realDonaldTrump) January 23, 2018

However, Kelly has faced heightened scrutiny in recent weeks for his handling of domestic violence allegations against ex-White House staff secretary Rob Porter.

Porter resigned in February after reports emerged that his two ex-wives accused him of domestic abuse. Kelly reportedly knew about the abuse allegations before they became public and initially continued to defend Porter after the first reports came out.

Kelly has not explained why he did not cut ties with Porter after the FBI notified the White House about the allegations that turned up during the staffer's background check.

He later said the matter was "all done right."