Oil jumped almost 4 percent on Monday after a rally in U.S. gasoline and diesel due to a refinery outage helped crude futures advance from multi-month lows.

The dollar 's .DXY drop to a near two-week low also made oil and other commodities denominated in the greenback more affordable to holders of the euro and other currencies. [USD/]

Brent, the global benchmark for oil , rose 3.7 percent, posting its largest gain since end-May. U.S. crude rose 2.5 percent, its most in two months.

The rally came after a malfunction at the 240,000-barrels-per-day crude distillation unit at BP's Whiting, Indiana refinery sent gasoline prices RBc1 soaring more than 4 percent.

Ultra low sulfur diesel HOc1 gained more than 3 percent, rebounding from last week's six-year lows.

"A reduction in refinery activity should logically decrease the demand for crude , all things being equal," said David Thompson, executive vice-president at Powerhouse, an energy-specialized commodities broker in Washington.

"But the strong link between refined products and crude in the instance of a refinery issue creates the dynamic where the increased demand for the now, temporarily scarce gasoline outweighs the lessened demand for crude ."

Brent crude settled up $1.80 at $50.41 a barrel. It hit a six-month low of $48.24 earlier in the session.

U.S. crude CLc1 settled $1.09 up at $44.96 a barrel. It plumbed a 4-1/2 month of $43.35 in Asian trading.

Brent lost 23 percent of its value in the past six weeks and U.S. crude 26 percent, pushed down by an oil glut.

Despite such oversupply, hedge funds and other big speculators raised their bullish exposure to U.S. crude last week for the first time in seven weeks, trade data showed.

While U.S. crude settled higher on Monday, its front-month contract was at the largest discount to the second-month CLc1-CLc2 since mid-July due to a higher oil surplus expected from the refinery outage in Whiting and elsewhere.

U.S. crude 's discount to Brent CL-LCO1=R was also back above the $5-per-barrel mark in the widest gap in two weeks.

Refined oil products usually rally during the summer in the United States, when driving activity peaks. This year's run-up in gasoline came as early as April but lost steam by July as some traders and investors deemed the market had gotten ahead of itself.

On Monday, the gasoline "crack" CL-RB1=R, or refining margin, hit a one-week high above $26 a barrel. The diesel crack CL-HO1=R rose to a 2-1/2 month peak above $22.