MEXICO CITY (Reuters) - Mexico’s central bank raised its benchmark interest rate on Thursday to a nearly 8-year high in a bid to curb rising inflation after a steep hike in gasoline prices and weakness in the peso sparked by Donald Trump’s U.S. election win.

The Banco de Mexico hiked interest rates MXCBIR=ECI by 50 basis points to 6.25 percent, the highest level since March 2009 and in line with expectations in a Reuters poll.

The central bank said it raised rates to avoid consumer price contagion following a jump in gasoline prices and to anchor inflation expectations.

Mexican policymakers said they would closely watch for any sign that higher gasoline prices or the weak peso were fueling widespread pressures on inflation.

“They are leaving the door open for additional moves during this year. The key is to not let inflation expectations for 2018 also be contaminated,” said Rafael Camarena, an economist at Santander.

Mexico’s annual inflation accelerated faster than expected to 4.72 in January, data showed earlier on Thursday, its highest rate in more than four years, after the government raised regular gasoline prices by 14 percent.

In its statement, the central bank said the outlook for both growth and inflation had worsened, but that the impact from the gasoline price hike was expected to be temporary.

Policymakers said that inflation would continue to run above its 4 percent upper limit before beginning to ease late in the year and move back toward 3 percent in 2018.

The peso MXN= extended gains after the decision

The central bank raised rates five times last year, lifting borrowing costs by a cumulative 250 basis points as the peso slid to successive record lows.

The peso tumbled past 22 per dollar to an all-time low just ahead of U.S. President Donald Trump’s inauguration on concerns he would rip up a free trade agreement with Mexico.

The currency has rallied back about 7 percent since Trump took power after he did not immediately move to impose tariffs on Mexican goods.