Thousands of homeowners who think they'll be able to stop paying for mortgage insurance with the help of a new federal law that takes effect July 29 could be in for a rude shock.

They may find that no matter what Congress has decreed, they are locked into costly monthly premiums for years. That's because, often unknown to the homeowners, their mortgages carry special, fine-print terms requiring insurance coverage for a mandatory period of time--sometimes as long as seven years.

This is particularly true for thousands of outstanding loans owned by the behemoths of the mortgage industry, Fannie Mae and Freddie Mac. Though both companies have announced that they will allow eligible homeowners to request insurance cancellation when increased property values have pushed their equity in their homes to 20 percent, that policy has a little-known, but important, exception: Owners whose mortgages are part of "negotiated" packages bought by Fannie or Freddie from major lenders may not be covered.

Mortgage insurance generally is required by lenders whenever a borrower makes a down payment that is less than 20 percent. More than 1 million American households pay for coverage, typically at a cost of $50 to $100 extra per month. Under legislation that takes effect July 29, lenders will be required to cancel borrower-paid insurance coverage automatically on new loans when the borrower's payments reduce the balance to 78 percent of the original amount. New borrowers whose property values have appreciated may be able to request cancellation when their equity stakes reach 20 percent.

Charles Peterson of Fresno, Calif., is one of potentially thousands of American homeowners whom the new law won't help. Peterson refinanced the mortgage on his house in March 1996. His loan balance before refinancing was modest--about $37,000 at 8.5 percent. After refinancing, Peterson ended up with a new loan for $60,000 at 7.75 percent.

Peterson said he was told by the local mortgage brokerage firm where he obtained the loan that he would need to have mortgage insurance coverage. But neither the loan officer nor the mortgage insurance disclosure statement he received "ever really explained to me that I was signing up for something different," with tougher terms than standard policies, Peterson said.

But he was. Peterson's loan was sold to the largest independent mortgage banking firm in the country, Calabasas, Calif.-based Countrywide Home Loans, where it became part of a pool of mortgages that Countrywide eventually resold in a special negotiated transaction to Fannie Mae. Such pool transactions have been routine for years and allow a giant investor like Fannie to buy loans that don't fit its standard guidelines or that are perceived to carry higher than typical risks. To cover the added risks, Fannie--and Freddie Mac--both require extra insurance coverage and other concessions.

Peterson's loan fit the added-risk category, according to a Countrywide official, because it was a "cash-out" refinance: He raised his debt to $60,000 from $37,000--cashing out an extra $23,000. As a result, the mortgage insurance policy--unseen by Peterson--prohibited cancellation of premium payments under any circumstances for the first seven years, until 2003.

Last October Peterson got the first inkling that his mortgage insurance was different. Having read in his local newspaper that Congress had passed a law spelling out consumers' rights to cancel mortgage insurance, he wrote to Countrywide to request that his premium payments be terminated. His home now was "conservatively" worth enough--$82,500--to give him at least a 27 percent equity stake, well beyond Congress's threshold. But Countrywide's response "just blew me away," Peterson said.

The letter from Countrywide said that because his loan was a cash-out refinance, its mortgage insurance policy would have to continue for seven years, after which he would be subjected to he following tests: He would need to have paid the loan on time for the past 12 months and couldn't have been 30 days late any time during the past 24 months. Then, after an appraisal paid for by Peterson and conducted by an appraiser selected by Countrywide, Peterson's equity would have to be at least 30 percent of the value of the house. A subsequent letter from Countrywide lowered the required equity stake to 25 percent but retained the seven-year requirement.

Are there many homeowners like Charles Peterson out there, paying on mortgage insurance policies that aren't covered by the reforms of the new federal cancellation law? Fannie Mae and Freddie Mac officials aren't sure how many people potentially are in this situation, but they confirm that the number could be in the thousands. Both companies argue that borrowers who took out loans deemed high-risk during the past few years should have been informed upfront--at the loan origination stage--about precisely what special insurance they were getting.

That never happened in Peterson's case. Check your own mortgage insurance fine print to make sure it didn't happen in yours.