WASHINGTON, March 19 (Reuters) - The average rate on the popular U.S. 30-year ‌fixed-rate mortgage surged to a ‌three-month high this week as war in the ​Middle East stoked inflation fears, dealing a blow to the Trump administration's efforts to make housing more affordable.

The 30-year fixed ‌mortgage rate averaged ⁠6.22%, highest since early December, up from 6.11% last week, ⁠mortgage finance agency Freddie Mac said on Thursday. Rising mortgage rates, if sustained, ​could hamper ​home sales ​during the typically busy ‌spring season.

The benchmark rate fell to 5.98% on the eve of the U.S.-Israeli war with Iran after President Donald Trump ordered Freddie Mac and Fannie ‌Mae to expand purchases ​of mortgage-backed securities.

It reversed ​course as ​the conflict drove up oil ‌prices and U.S. Treasury ​yields. Mortgage ​rates track the benchmark 10-year Treasury yield. Housing affordability has become an ​increasingly potent ‌political issue ahead of the November ​midterm elections.

(Reporting by Lucia Mutikani; editing ​by David Gaffen)