Some U.S. homeowners and renters who are reeling under the financial effects of the coronavirus outbreak will not need to fear losing their homes to foreclosure or being evicted during the public-health crisis, officials said this week.

The Federal House Finance Agency announced Wednesday it had told Fannie Mae FNMA, +2.51% and Freddie Mac FMCC, +1.84% to suspend all foreclosure actions and evictions for at least 60 days because of the coronavirus national emergency. The suspension applies to homeowners who have a loan backed by Fannie or Freddie.

Freddie Mac and Fannie Mae have also said they would provide forbearance options to borrowers who were affected by the pandemic. Forbearance allows mortgage payments to be suspended for up to 12 months because of economic hardship that was caused by the coronavirus outbreak.

“This foreclosure and eviction suspension allows homeowners with an Enterprise-backed mortgage to stay in their homes during this national emergency,” said FHFA director Mark Calabria.

Fannie Mae and Freddie Mac alone accounted for upward of 46% of all mortgages originated as of 2018, according to a report from the Urban Institute, while the Federal Housing Administration- and Veterans Affairs-backed loans accounted for almost 23% of all new mortgages. Therefore, a majority of homeowners with a mortgage will be safe from foreclosure or eviction thanks to the policies announced by HUD and the FHFA.

Calabria also noted that “borrowers affected by the coronavirus who are having difficulty paying their mortgage should reach out to their mortgage servicers as soon as possible.” Fannie Mae and Freddie Mac are working with mortgage servicers, which are the companies that receive people’s monthly mortgage payments, to make sure those borrowers can get assistance.

Separately, President Donald Trump announced during a briefing Wednesday that the U.S. Department of Housing and Urban Development will suspend foreclosures through the end of April. Trump also said HUD would not allow any evictions through that time.

“The Department of Housing and Urban Development is providing immediate relief to renters and homeowners by suspending all foreclosures and evictions until the end of April,” Trump said during the press conference. “We’re working very closely with [HUD Secretary] Dr. Ben Carson and everyone at HUD.”

The HUD moratorium on evictions and foreclosures that Trump announced applies to homeowners who have Federal Housing Administration loans, and all homeowners with loans backed by the FHA are eligible.

Secretary Carson announced that HUD was working with Congress to get the authority to prevent evictions for those in living in public housing. “HUD has been in contact with every Public Housing Agency in the country to ensure the millions of low-income Americans we serve continue to have a roof over their head,” Carson wrote on Twitter on TWTR, +2.03% Wednesday.

Read more: The Fed dropped interest rates to 0% — what that means for your credit cards and bank accounts

HUD has also recommended that owners of public-housing projects should “work with impacted residents and families to adjust rent payments, enter into forbearance agreements, and lessen the impact on affected residents,” but the department noted that no additional funding has been made available to assist in that effort.

Consumer advocates argued that these policies were necessary as hundreds of thousands of Americans have their income and finances disrupted as a result of the outbreak. Avoiding evictions at a time when millions of people could lose income is also a matter of public health.

“This pandemic is a stark reminder that housing is health care,” said Diane Yentel, president and CEO of the National Low Income Housing Coalition. “Policy makers at all levels should immediately implement moratoriums on foreclosures and evictions.”

Also see: The Fed cut interest rates to zero, but don’t expect to see 0% mortgages anytime soon

Prior to Wednesday’s announcements, many cities across the country, including New York and San Jose, had begun issuing temporary moratoriums on evictions during the coronavirus crisis. These moves were supported by major industry groups, including the Real Estate Board of New York, the National Apartment Association and the National Multifamily Housing Council.

This story has been updated to include new information from the Department of Housing and Urban Development.