By Kevin Baxter and Stephanie Yang

Oil prices rose to a three-week high Monday as investors continued to bet that the Organization of the Petroleum Exporting Countries will reach a production deal at the end of the month.

Light, sweet crude for December delivery gained $1.27, or 2.7%, to $47.79 a barrel on the New York Mercantile Exchange, trading at the highest level since Oct. 31. Brent, the global benchmark, was recently up $1.34, or 2.9% at $48.20 a barrel.

Prices were buoyed by news that the energy ministers from two of OPEC's most reluctant members in terms of cutting output, Iraq and Iran, are backing the proposal. The cartel meets Nov. 30 when it will formallydecide on strategy for the first half of 2017.

"It's all adding up to where people are a little bit more bullish," said Donald Morton, senior vice president at Herbert J. Sims Co., who runs an energy-trading desk. "Everybody wants to turn into a buyer."

The change in sentiment marks a one-week turnaround for crude oil, as skepticism over OPEC's ability to come to a deal has tempered. Oil prices have risen in four out of the last five sessions, bouncing off a three-month low.

Analysts have also become more positive on the outlook for a production cut. On Monday, Goldman Sachs raised the forecast for oil prices in the first half of 2017, given expectations that OPEC will announce and implement a production cut. A Bank of America Merrill Lynch research report also noted that a supply cut looks highly probable.

However, "political risks can still derail an otherwise economically sound decision," Goldman Sachs analysts wrote.While the market largely expects OPEC to cut production, some remain cautious going into the meeting.

"Their track record is horrendous," said Mark Waggoner, president of Excel Futures. "Somebody makes another statement, things could change."

Traders also noted that any shift in expectations could lead to heightened volatility before the meeting, especially given the holiday week and less activity in the market.

OPEC now faces a difficult choice at the meeting regarding output cuts, with neither outcome being particularly beneficial to the cartel, according to Barclays. In a note, analysts stated that cutting production would give prices a short-term boost, but it would be U.S. producers that reaped the benefit in the mid term, by using the fillip to lock-in higher prices for future production.

It added that a hands-off approach would allow the market to balance naturally and keep many U.S. producers at bay for the time being, but would also hurt financially.

"We still expect OPEC to agree to a face-saving statement. It would showcase agreement, provide flexibility, and not veer too far from what countries had planned initially for [the first half of 2017]," said Barclays.

Morgan Stanley said that any OPEC deal would almost certainly prompt some short-covering, a market term for buying back a commodities contract for a lower price than it was sold, which could then kick-start a rally. It added that at current prices, the downside risk for OPEC not agreeing to cuts is limited as a "fair amount of skepticism" has already been priced in.

Gasoline futures were recently up 3.3% at $1.3838 a gallon and diesel futures were up 3.4% at $1.5073 a gallon.

Write to Kevin Baxter at Kevin.Baxter@wsj.com and Stephanie Yang at stephanie.yang@wsj.com

(END) Dow Jones Newswires

November 21, 2016 10:42 ET (15:42 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.