The West Texas Intermediate for June delivery increased 4.17 U.S. dollars, or 20.45 percent, to settle at 24.56 dollars a barrel on the New York Mercantile Exchange, notching a five-day winning streak.
Brent crude for July delivery rose 3.77 dollars, or 13.86 percent, to close at 30.97 dollars a barrel on the London ICE Futures Exchange.
The Organization of the Petroleum Exporting Countries and its allies agreed to cut output by 9.7 million barrels per day for May and June, aiming to tackle a global supply glut amid the COVID-19 crisis.
Meanwhile, U.S. energy companies have made efforts to limit production.
Output cuts by major U.S. shale producers are expected to reach 300,000 barrels per day for May and June, according to estimates by consulting firm Rystad Energy.
The number of active U.S. rigs drilling for oil decreased by another 53 to 325 last week, oilfield services company Baker Hughes reported on Friday.
Market sentiment was also bolstered as traders bet a pickup in crude demand as more countries started to ease lockdown restrictions.
However, experts noted that uncertainties remain on the energy markets.
"We believe that too many questions still remain open for this to be said with any certainty, be it with respect to the recovery of demand or to the supply cuts," Eugen Weinberg, energy analyst at Commerzbank Research, said in a note on Tuesday.