Four companies lost a combined $20 billion—and they were the survivors.
The private mortgage insurance industry was leveled by the housing crash, but those that didn't go under are finally digging their way out, reaching profitability for the first time in six years, while new entries are making a strong start. Private mortgage insurance is required for borrowers taking out low down-payment loans.
(Read more: Mortgage rate spike finally hits housing market)
The comeback is being fueled by lower mortgage delinquencies and growing business, especially as the Federal Housing Administration begins to pull back. The FHA, which during the housing boom backed just 3 percent of new loans, took on 80 percent of the market during the crash, leaving private insurers with little new business. Now the FHA has raised its premiums, making a concerted effort to bring private capital back into the market.
There are now six private mortgage insurers, which together wrote nearly $49 billion in new business in the second quarter, up 27 percent from the first quarter, according to data from Inside Mortgage Finance.
Of the publicly traded insurers, MGIC, Genworth and United Guaranty (part of AIG), reported positive income, with Radian still trying to break out of negative territory. Privately held Essent Guaranty, a newbie, is coming on strong, with $10 billion in new business through the first half, versus $3.6 billion in the year-earlier period, according to IMF.
"Delinquencies are down, and the companies have recapitalized," said Bose George, an analyst at Keefe Bruyette & Woods. "At the same time, FHA is reducing its role in the market, so this has given them significant growth opportunities. ... The companies have reversed their position and are starting to show modest profitability."
(Read more: Mortgage delinquencies take a sharp turn up)
The private insurers have also benefited from the government housing bailout—the refinance program for underwater borrowers as well as the Home Affordable Modification Program. Both help borrowers make their monthly payments and stay current on their loans, although HAMP has come under fire recently as a report from the Troubled Asset Relief Program's inspector general found the program had a high re-default rate.
"But without those programs it would have been a lot worse. Most of these borrowers would have been delinquent and would have foreclosed, and been a payment for the mortgage insurers," George said.
(Read more: What you need to know if Fannie and Freddie go)
The private insurers also could benefit in the future as Congress prepares to wind down mortgage giants Fannie Mae and Freddie Mac. New proposals include risk-sharing on mortgage-backed securities, which could add to the insurers' traditional role of backing individual mortgages.
Just last month Fannie Mae took out insurance on a pool of about $5 billion of loans from National Mortgage Insurance Corp. Recent entrant NMI Holdings began writing polices in April.
—By CNBC's Diana Olick. Follow her on Twitter @Diana_Olick.