WASHINGTON — The HUD official considered by many to be crucial to both the agency's smooth operation and to Puerto Rico recovery efforts resigned Monday and will transition out of the role in January.

As deputy secretary of HUD, Pam Patenaude ran operations at the $50 billion agency. Current and former HUD officials and low-income housing advocates all described the HUD veteran as instrumental to the functioning of the federal housing agency.

Some said she and not HUD Secretary Ben Carson "ran the agency." A HUD spokesperson pushed back sharply on that characterization.

"This morning I informed Secretary Carson of my decision to leave HUD in the new year," Patenaude tweeted in a statement. "Serving at HUD as Deputy Secretary has been the highlight of my 35-year career in housing."

"It has been an honor to serve President Trump and Secretary Carson and I am deeply grateful to both for this opportunity. Thank you to my HUD family and fellow 'housers' for helping Americans access decent, safe and affordable housing."

Carson said in a statement: "On behalf of a grateful agency, and the families and communities we serve, I want to thank her for her tremendous contributions to advancing HUD’s mission. ... She is a true public servant, and I wish her well as she returns to private life in New Hampshire."

In a statement, a senior HUD official said that Federal Housing Administration Commissioner Brian Montgomery will serve as acting deputy secretary. A spokesperson said Montgomery will not step down from FHA but still instead do both jobs.

The senior official added, "The department and those we serve are in good hands. We have a very deep bench of political and career employees with decades of relevant experience. Our efforts to increase the supply of housing, end homelessness, enforce fair housing laws, respond to disasters, improve the fiscal condition of HUD and ensure Americans have access to safe, sanitary, and decent housing will continue unabated."

Mel Martinez, who was HUD secretary under President Bush, told NBC News that he was surprised and disappointed to learn Patenaude was leaving, but that Montgomery was a good choice to get the job. "It makes a lot of sense for Brian to be the permanent deputy secretary," said Martinez. "He's a terrific guy."

Immediate reaction from the real estate and public housing community was strong. "@HUDDepSec Pam Patenaude has resigned. This is a loss for @HUDgov and for those in need of safe and affordable housing," tweeted Michael Novogradac, whose firm Novogradac and Company specializes in affordable housing and community development.

Adrianne Todman, CEO of the National Association of Housing and Redevelopment Officials, called the resignation a "tremendous loss to the agency."

The head of the National Low Income Housing Coalition, Diane Yentel, also characterized Patenaude's departure as a major loss, saying Patenaude's housing strengths held the agency together and "offset Secretary Carson's weaknesses on housing."

Yentel wrote in an email to NBC News: "Pam advanced some helpful policies, particularly around disaster housing recovery and, as importantly, stopped many harmful proposals from moving forward. With her gone, others in the administration may have a better chance of advancing their harmful agenda of work requirements, time limits and funding cuts to critical programs."

"I find the news disappointing as in fact she was one of the few [political appointees] in the administration with some level of sanity," said former HUD official Gustavo Velasquez who worked under the Obama administration.

Patenaude's exit is significant for Puerto Rico, where she managed the effort to distribute rebuilding funds. HUD plays a major role in doling out funds for post-disaster recovery following Hurricane Maria. Advocates are concerned about who would step in for Patenaude. The nonvoting U.S. House representative for Puerto Rico, Jenniffer González-Colón, tweeted, "We will miss having this direct experience and knowledge especially at a time when we badly need to speed up the process to get those funds where and to whom they need to get."

"The entire nation loses one its finest, most transparent and passionate public servants," Puerto Rico Gov. Ricardo Rosselló said via Twitter. "On behalf of everyone in Puerto Rico, I want to thank you for your friendship, tireless work, commitment and guidance."

Island officials considered Patenaude a key liaison between the agency and Puerto Rico — especially after HUD approved a total of $20 billion in aid to help the commonwealth rebuild its infrastructure after Hurricane Maria.

According to Puerto Rico's leading newspaper, however, 15 months after the hurricane "not a single cent has been disbursed." Puerto Rico's Housing Dept. confirmed to NBC News that the money had not been received. Island officials have to submit a series of plans that outline how they plan to use the money and await federal approval. This process has significantly delayed the funds’ disbursement. So far, Puerto Rico has not received any of the already-allocated money.

During her time as HUD deputy secretary, Patenaude visited Puerto Rico numerous times, including the hard-hit town of Canóvanas, where she announced HUD's $18.5 billion grant to Puerto Rico back in May. This allocation of funds is the largest single amount of disaster recovery assistance awarded in the agency's history.

"As Puerto Ricans, we will always be in debt to you for your sincere efforts to help us rebuilt our Island," Fernando Gil Enseñat, Puerto Rico's housing secretary, said at a news conference Monday.

Fair housing advocates are also disappointed by the news. "I do know that she told me, to my face, that she was completely committed to fair housing," said Lisa Rice, president/CEO of the National Fair Housing Alliance. "She pushed HUD’s leadership on fair housing, recognizing they did not come with that expertise. It will not be easy to find someone to replace her."

Patenaude's name had originally circulated as a possible HUD secretary given her more than 20 years of experience in senior housing roles, but the job instead went to Carson, the high-profile surgeon and former presidential candidate. Patenaude served in the Bush administration in multiple senior leadership roles at HUD. Her tenure at President Donald Trump's HUD was just over a year since she was confirmed in September 2017.

Patenaude is known as a strong Trump supporter. Her daughter Megan Patenaude serves as a scheduler/deputy assistant to Vice President Mike Pence.

Patenaude resigned the same day a new homelessness assessment by HUD shows national homeless figures have edged up .03 percent, the second year in a row it has increased after seven years of declines.

The new numbers in the agency's homelessness report were hailed as a success in a press release by Carson. "Our state and local partners are increasingly focused on finding lasting solutions to homelessness even as the struggle against the headwinds of rising rents," said Carson. "Much progress is being made and much work remains to be done but I have great hope that communities all across our nation are intent on preventing and ending homelessness."

A bright spot for the agency has been the specific ongoing success in reducing veteran homelessness. Monday's report found that "homelessness among veterans fell 5.4 percent and homelessness experienced by families with children declined 2.7 percent nationwide since 2017."