NEW YORK (Reuters) - Oil prices surged to an 18-month high on Monday after the world’s top crude producers agreed to the first joint output cut since 2001, sparking concerns about inflation, which pushed up U.S. Treasury yields to a more than two-year peak.

A gas station attendant pumps fuel into a customer's car at PetroChina's petrol station in Beijing, China, March 21, 2016. REUTERS/Kim Kyung-Hoon

Yields also gained ahead of a two-day Federal Reserve policy meeting that starts on Tuesday, where the U.S. central bank is expected to raise interest rates for the only the second time since the global financial crisis.

The gain in oil prices followed the weekend agreement between OPEC and key non-OPEC states. U.S. crude futures rose $1.33 to settle at $52.83 a barrel, a 2.6 percent gain, though that was sharply off the day’s highs.

Brent crude futures rose $1.36 to settle at $55.69, a 2.5 percent rise, after hitting a session peak of $57.89, the highest since July 2015.

There was particular surprise as Saudi Arabia, the world’s top producer, said it may cut its output even more than it had first suggested at an Organization of the Petroleum Exporting Countries meeting just over a week ago.

Energy shares rose sharply in early U.S. trading, helping lift the Dow Jones industrial average and S&P 500 to record intraday highs. But the S&P 500 ended lower along with the Nasdaq. Consumer discretionaries and tech were among sectors that weighed on the S&P 500.

The OPEC news and surge in oil prices were “good news for economic growth in the U.S. as well as Russia and others. But it will be to some extent tempered by a little bit of an impact on consumer spending,” said Hugh Johnson, chief investment officer of Hugh Johnson Advisors LLC in Albany, New York.

“There are so many reasons to believe inflation is going to be headed higher, and this just adds fuel to that fire,” which is why bond yields are up and the U.S. stock market is mixed, he said.

The Dow Jones industrial average was up 39.58 points, or 0.2 percent, to 19,796.43, the S&P 500 lost 2.57 points, or 0.1 percent, to 2,256.96 and the Nasdaq Composite dropped 31.96 points, or 0.59 percent, to 5,412.54.

MSCI’s all-country world stock index was nearly flat, while Europe’s STOXX 600 ended down 0.5 percent.

Benchmark U.S. bond yields topped 2.5 percent for the first time since October 2014, with analysts saying the OPEC agreement had boosted reflation expectations.

“We have the Fed decision coming up on Wednesday, and people are unsure whether they should buy the dip here,” said interest rate strategist Gennadiy Goldberg of TD Securities in New York.

U.S. 10-year notes were down 4/32, while the yield rose to 2.478 percent from 2.464 percent late on Friday. Earlier, the yield touched 2.528 percent, its highest since Sept. 29, 2014.

FED AHEAD

In the currency markets, the dollar fell against most major currencies on concerns the Fed could suggest in an upcoming policy statement that the greenback’s gains had gone too far.

At the same time, the gains in oil prices boosted commodity-linked currencies.

The dollar index, which measures the greenback against a basket of six major currencies, was last down 0.6 percent at 100.980, easing from an earlier 1-1/2-week high of 101.780.

The Aussie was up 0.4 percent against the dollar at $0.7488, while the New Zealand dollar was up 0.6 percent against the greenback at $0.7181.

Gold prices turned higher after falling to their lowest in more than 10 months as the U.S. dollar fell.

Spot gold rose 0.3 percent at $1,161.62 an ounce after tapping its lowest since Feb. 5 at $1,151.34 an ounce.