U.S. mortgage rates rose for a second consecutive week as Treasury yields climbed, a move that does not bode well for the hard-hit U.S. housing market.

Interest rates on U.S. 30-year fixed-rate mortgages averaged 5.25 percent this week, up from last week's 5.20 percent, according to a survey released on Thursday by home funding company Freddie Mac.

The mortgage rate was also significantly higher than the record low of 4.78 percent set the week ending April 2. Freddie Mac started the Primary Mortgage Market Survey in 1971.

Mortgage rates remained above 5 percent for a ninth straight week. Experts say mortgage rates at 5 percent and below are necessary to make a significant impact on home loan demand.

Treasury yields, which are linked to mortgage rates, have risen recently, with mortgage rates responding in kind.

Bond yields rose slightly higher this week on market optimism that the economy may be stabilizing somewhat, and mortgage rates followed, Frank Nothaft, Freddie Mac vice president and chief economist, said in a statement.

The rise in rates is a negative for the U.S. housing market, which has been showing some signs of stabilization, with sales rising and home price declines moderating in many regions, and even rising in some regions.

Thirty-year mortgage rates had been on a downward trend for most of this year after the Federal Reserve unveiled its plan to buy mortgage-backed debt in late November. But the Fed met resistance in the bond market.

The U.S. government has embarked on an aggressive plan to bring mortgage rates down to levels that will spur demand and help the hard-hit housing market begin to recover.

The Fed has set a goal to buy up to $1.25 trillion of agency MBS, $300 billion of Treasuries and $200 billion of agency debt in 2009. The purchases are more than half-way completed and are part of efforts to lower borrowing costs.

The battered U.S. housing market, which has suffered the worst downturn since the Great Depression, is both the source and a major casualty of the credit crisis. A setback for the market could prolong a turnaround for the United States, the world's largest economy.

(Editing by Neil Stempleman)