WASHINGTON — Results of financial “stress tests” show that mortgage giants Fannie Mae and Freddie Mac, rescued by taxpayers in the 2008 crisis, would need as much as $157.3 billion in additional aid in a severe U.S. and global recession.

The agency that oversees Fannie and Freddie, the Federal Housing Finance Agency, announced Thursday the results of the second annual stress tests. Fannie and Freddie are required to conduct the tests under the 2010 law that overhauled financial regulation after the crisis.

The government spent $187 billion to rescue the companies after they incurred massive losses on risky mortgages. The gradual recovery of the housing market has made the companies profitable again, and they have fully repaid the government loans.

Fannie and Freddie buy home loans from banks and other lenders, package them into bonds with a guarantee against default and then sell them to investors around the world. Together they own or guarantee about half of all U.S. mortgages, worth around $5 trillion.

The FHFA’s new report said the companies would need between $68.6 billion and $157.3 billion in additional aid under a severe economic scenario.

That would involve between $34.2 billion and $94.9 billion for Washington-based Fannie, and between $34.4 billion and $62.3 billion for smaller sibling Freddie, based in McLean, Virginia.

The latest results appear to show an improvement from last year’s stress tests, which indicated the companies would require between $84.4 billion and $190 billion.

Under the stress tests’ hypothetical “severely adverse” scenario, the U.S. would endure a catastrophic recession in which unemployment soars to 10 percent, home prices sink 25 percent, the stock market plunges nearly 60 percent and market volatility rises sharply.