Acting Department of Homeland Security Secretary Chad Wolf is stepping down, Fox News has learned.

Wolf sent a letter to DHS employees Monday afternoon informing them of his decision.

"I am saddened to take this step, as it was my intention to serve the Department until the end of this Administration," Wolf wrote. "Unfortunately this action is warranted by recent events, including the ongoing and meritless court rulings regarding the validity of my authority as Acting Secretary."

Wolf went on to say that Pete Gaynor, the Federal Emergency Management Agency (FEMA) administrator, will become the acting secretary of DHS. He tweeted the statement later on Monday.

"Be proud of what we have accomplished," Wolf told DHS employees, "The Homeland is safer and more secure because of your efforts."

DHS CHIEF WOLF CALLS ON TRUMP TO CONDEMN 'UNCONSCIONABLE' VIOLENCE, SAYS HE WILL REMAIN IN POST

Wolf’s resignation came at a tumultuous time for the administration and apparent conflict between him and President Trump. A source from DHS front office source said it was explicitly not a protest resignation. A White House spokesman reportedly denied the withdrawal was related to Wednesday's event’s or Wolf’s comments Thursday. However, a source close to Wolf told Fox News the Capitol riots factored into his decision.

Trump had nominated Wolf to serve as permanent DHS secretary but withdrew the nomination shortly after Wolf publicly urged the president to condemn last week’s riots at the Capitol. According to a senior administration official, Wolf was no longer eligible to serve as acting secretary.

"These violent actions are unconscionable," Wolf said Thursday, "and I implore the President and all elected officials to strongly condemn the violence that took place yesterday."

At the time, Trump was facing sustained criticism for his ongoing rhetoric about the 2020 presidential election being stolen from him.

"Any appearance of inciting violence by an elected official goes against who we are as Americans," Wolf said.

HOMELAND SECURITY WARNS RUSSIA MAY HAVE HACKED FEDERAL AGENCIES

Wolf’s tenure as acting secretary, which began in 2019, saw conflicts surrounding the legitimacy of his authority as well as his department's response to the coronavirus and racially-charged riots last year.

The Government Accountability Office said in August that Wolf and his acting deputy, former Virginia Attorney General Ken Cuccinelli, weren't legally serving. A federal judge added in November that Wolf lacked authority to limit the validity of permits for the Deferred Action for Childhood Arrivals (DACA) program, something he tried to do in a memo last summer.

In his letter to employees Monday, Wolf closed by telling DHS employees he is confident the transition process will run smoothly.

"I leave knowing the Department has positioned itself for an orderly and smooth transition to President-elect Biden’s DHS team," he wrote. "Welcome them, educate them, and learn from them. They are your leaders for the next four years - a time which undoubtedly will be full of challenges and opportunities to show the American people the value of DHS and why it is worth the investment."

House Homeland Security Committee Chairman Bennie Thomspon, D-Miss., scrutinized Wolf's decision and said it indicated that Cuccinelli should resign as well.

"For months we have known Chad Wolf has been serving illegally in his position, so the timing of his resignation from the Department today is questionable," Thompson said.

CLICK HERE TO GET THE FOX NEWS APP

"He has chosen to resign during a time of national crisis and when domestic terrorists may be planning additional attacks on our government. Unlike others, he is apparently not leaving the Trump Administration on principle.

"If it is true he is resigning because of recent Federal court decisions, then it is an admission that his policy decisions are indeed invalid. Under this scenario, Ken Cuccinelli must also resign."

Fox News' Gillian Turner and John Roberts contributed to this report.