The average rate on the 30-year fixed mortgage rose sharply this week after falling below 4 percent for the first time in history.

Freddie Mac said Thursday that the rate on the 30-year fixed loan rose to 4.12 percent. That's up from 3.94 percent last week, the lowest rate ever according to the National Bureau of Economic Research.