Mexican consumer prices jumped 0.42 percent in July, accelerating from June and pushing 12-month inflation above the 4-percent limit the central bank says is acceptable.
Closely watched core inflation, which strips out some volatile food and energy prices, was 0.34 percent during the month, the bank said on Thursday.
Prices rose 4.14 percent in the 12 months through July.
Analysts polled by Reuters on Wednesday had expected the consumer price index to rise 0.37 percent in July and had forecast a 0.34 percent increase in the core inflation index for the month.
The central bank said last week that annual inflation, as gauged over a 12-month period, could accelerate to above 4 percent during the third quarter before falling below 3.75 percent by year end.
In June the consumer price index rose 0.12 percent, while the core CPI index rose 0.30 percent.
Most analysts expect the bank will leave interest rates unchanged at its next policy announcement on Aug. 24.
But they say recent inflation data could put pressure on the bank to hike interest rates, especially if economists' price forecasts deteriorate.
There is a risk of expectations being contaminated, said Omar Borla, an economist at Dresdner Kleinwort in New York.
Higher inflation expectations, which have risen in recent months, can act as a self-fulfilling prophecy by prompting companies to raise prices and workers to demand higher wages.