In this dramatic week, the story of mortgage rates has a twist ending.

The benchmark 30-year fixed-rate mortgage fell 6 basis points, to 6.42 percent, according to the Bankrate.com national survey of large lenders. A basis point is one-hundredth of 1 percentage point. The mortgages in this week’s survey had an average total of 0.45 discount and origination points. One year ago, the mortgage index was 6.82 percent; four weeks ago, it was 6.62 percent.

The benchmark 15-year fixed-rate mortgage fell 6 basis points, to 5.95 percent. The benchmark 5/1 adjustable-rate mortgage was unchanged, at 6.05 percent. The 30-year, fixed-rate jumbo mortgage was unchanged, too, at 7.64 percent.

Over the last week, rates moved up and down in fairly big swings as investors digested news of the failure of IndyMac Bank, as well as of the federal government’s promise to protect mortgage financing giants Fannie Mae and Freddie Mac. TV business shows and blogs were full of speculation about the fate of regional banks and whether any would go the way of IndyMac into FDIC conservatorship.

The burst of big-headline news was quite stirring. Then came the surprise ending. Bankrate’s weekly mortgage survey is conducted on Wednesdays. Bankrate had collected much of the rate data by the time the Consumer Price Index was released Wednesday morning. The CPI showed that inflation had been higher than expected in June.

In reaction to the news of higher-than-expected inflation, many lenders raised mortgage rates — after Bankrate already had collected rate data.

Had the timing been different, the rate survey might have shown a rate increase of 5 to 10 basis points compared with the previous week.

CPI shows higher inflation

The overall Consumer Price Index advanced 1.1 percent in June, and was up 5 percent in the 12 months ending in June. The core inflation rate, which disregards food and fuel, rose 0.3 percent in June, and was up 2.4 percent in 12 months.

Those rates are higher than most investors expected. Higher inflation means higher long-term interest rates. The biggest culprit was rising energy prices, particularly for car fuel. Energy prices were up 24.7 percent in the 12 months ending in June, and they’ve been going up at a faster rate than that in the last three months.

“We have a stagnating economy with rising inflation,” says Joel Naroff, economist and principal of Naroff Economic Advisors of Holland, Pa. Those are red-flag words to anyone who remembers the stagflation of the late 1970s and early 1980s, but Naroff says things aren’t nearly as bad as those days, which are remembered for long lines at gas pumps, unemployment above 8 percent, and 18 percent mortgage rates.

Faced with a stumbling economy and rising inflation, the Federal Reserve faces a dilemma: Cutting short-term rates could exacerbate inflation. Raising short-term rates could send the economy further into a funk. “So monetary policy, out of necessity, is moving away from rate changes to liquidity and financial stability,” Naroff says.

That’s what the backstopping of Fannie and Freddie was about. The Fed announced that Fannie and Freddie could borrow through the discount window, if necessary. The announcement stabilized the market by easing investors’ fears that Fannie or Freddie could go under. Then the CPI tipped mortgage rates higher.