UPDATE 1-Mexico's central bank delivers own "hawkish surprise" with rate hike

(Adds analyst quote, new headline, US context)

MEXICO CITY, June 24 (Reuters) - The Bank of Mexico's board decided by a majority on Thursday to raise the benchmark interest rate by 25 basis points to 4.25%, saying it was necessary to avoid adverse effects on inflation expectations and citing price formation in the United States.

Three of the bank's board members voted for the hike, while two members voted to leave the rate unchanged at 4.0%. The surprise decision follows a hawkish tilt from the U.S. Federal Reserve last week, which signaled higher rates could come sooner than previously planned.

"It wasn’t the best management of market expectations, but the hike was necessary to anchor inflation expectations," Joel Virgen, an independent analyst who was chief economist for Mexico at Citibanamex and BNP Paribas, said on Twitter.

Mexican consumer prices rose 6.02% in the year through the first half of June, well above Banxico's target of 3% plus or minus one percentage point, data from the INEGI national statistics agency showed earlier in the day.

"In this context, it was deemed necessary to strengthen the monetary policy stance in order to avoid adverse effects on inflation expectations, attain an orderly adjustment of relative prices, and enable the convergence of inflation to the 3% target," Banxico said.

Mexico's peso extended gains after the unexpected rate hike and was up as much as 2% on the day versus the U.S. dollar. (Reporting by Anthony Esposito; Editing by Frank Jack Daniel)