President Trump's Friday Twitter announcement that Department of Homeland Security (DHS) Secretary John Kelly will replace Reince Priebus as White House chief of staff left one major question unanswered: Who is in charge at DHS?

Kelly's departure will leave an immediate vacancy at the department. His last day will be Monday, July 31, at which point Deputy Secretary Elaine Duke will become acting secretary, DHS press secretary Dave Lapan said in a statement Friday. Duke was sworn in on April 10.

Kelly's permanent replacement will require Senate confirmation. A role in the administration may look less appealing than it did several months ago, with the president having fired his FBI director and acting attorney general and many other senior administration officials submitting resignations.

Get Breaking News Delivered to Your Inbox

Kelly released a statement on his departure from the department Friday evening, thanking "the tremendous men and women of DHS."

"I thank you for the opportunity to serve as your Secretary. When I left the Marines, I never thought I would find as committed, as professional, as patriotic a group of individuals," the retired four-star general wrote. "I was wrong. You accomplish great things everyday defending our nation and I know your exceptional work will continue."

The vacancy comes at a time when the U.S. is facing the threat of a nuclear-capable North Korea, homegrown terrorism and other serious national security issues. House Homeland Security Committee Ranking Member Bennie Thompson (D-Mississippi), told CBS News the president's decision was "rushed."

"Unfortunately, It is clear that this decision was rushed and not well thought out," Thompson said. "The president and Republicans insisted the DHS secretary be confirmed on day one but now the president leaves this critical national security cabinet post vacant. He must now quickly replace Secretary Kelly with someone experienced and measured who understands that homeland security is not a partisan issue."

DHS did not immediately return a request for comment.