Oil Prices
An oil pumpjack works at dawn in the Permian Basin oil field near Andrews, Texas, Jan. 20, 2016. Spencer Platt/Getty Images

U.S. crude and Brent oil prices topped $50 a barrel Thursday as the global oversupply of crude continued to shrink.

Oil prices have rallied from a nearly 13-year low in recent weeks as supply disruptions in Canada, Nigeria and Libya knocked out nearly 4 million barrels a day of global production. The outages are helping to ease the crude glut that has weighed on the market for nearly two years.

U.S. crude futures rose 51 cents to $50.07 a barrel at 8:37 a.m. EDT, the highest level since mid-October. (As of 9:15 a.m., West Texas Intermediate had slipped back below $50 a barrel). Brent crude, the global benchmark, was up 61 cents to $50.35 a barrel.

The gains are partly a reaction to the drop in U.S. crude oil inventories, which fell by 4.2 million barrels in the week ending May 20, the U.S. Energy Information Administration reported Wednesday. Inventories declined after Canada, the biggest supplier of crude to the U.S. market, suffered widespread outages during weeks of vicious wildfires. The blazes forced oil sands producers in the western Alberta province to temporarily shutter facilities as workers fled to safety.

Nigerian oil production has also declined significantly in recent weeks as militant groups aim to force producers out of the oil-rich Niger Delta. Members of the militant group Niger Delta Avengers said they shut down Chevron Corp.’s onshore activities Wednesday after blowing up the main electricity feed at Chevron’s Escravos terminal, Reuters reported.

Escravos production was already down by more than 40,000 barrels per day after a May 5 attack on a Chevron offshore facility. Nigeria’s oil minister said earlier this month that militant activity has driven the country’s crude oil output to 22-year lows of less than 1.4 million barrels per day.

Ric Spooner, chief market analyst at Sydney’s CMC Markets, suggested Thursday’s gains in oil prices reflected traders’ desire to pass the “psychological barrier” of $50 a barrel. “There is a momentum; people will try and push it up over that,” he told Reuters.