Oil prices jumped more than 5% in extended hours on Friday after President Donald Trump said the Department of Energy would purchase crude for the nation's strategic petroleum reserve (SPR).

The move comes as U.S. energy companies, and shale producers in particular, have been battered by falling oil prices. On the week oil fell more than 24%, in its largest weekly decline since the financial crisis.

"Based on the price of oil, I've also instructed the Secretary of Energy to purchase at a very good price large quantities of crude oil for storage in the U.S. strategic reserve," Trump said as he addressed the nation from the Rose Garden on Friday.

"We're going to fill it right up to the top, saving the American taxpayer billions and billions of dollars, helping our oil industry [and furthering] that wonderful goal — which we've achieved, which nobody thought was possible — of energy independence."

U.S. West Texas Intermediate crude rose $1.61, or 5.1%, to trade at $33.13 per barrel. International benchmark Brent crude was up $1.71, or 5.1%, to trade at $34.93 per barrel.

"It is a fantastic idea," Again Capital's John Kilduff said to CNBC. "The SPR is one of the few levers that the U.S. can pull in times of oil market tumult. It has served the country well, when supplies get tight or otherwise become unavailable during times of natural disasters or geopolitical turmoil. Releases of supplies has served to short-circuit price rallies in the past, and this filling may well serve to ebb the current sell-off."

Oil continues to be hit on both the demand and supply side. The coronavirus outbreak has led to softer demand for crude as people cut back on travel, for example, while a breakdown in OPEC talks means there could soon be a supply glut as Saudi Arabia gets set to ramp up production to a record 13 million barrels per day. On Monday both contracts dropped 24% for their worst day in nearly three decades.

NationsShares president and chief investment officer Scott Nations said it's the "perfect" time to increase the SPR. "Prices are low and we're engaged militarily in the Middle East. For once, Russia's loss is our gain," he said.

WTI has shed 45% this year, and is currently 50% below its 52-week high level of $66.60, which it last traded at in April.

As prices slide, Oil and gas lobbyists met with White House policy staffers Wednesday morning to discuss the administration's response to the economy, OPEC price war and the coronavirus, a representative for the American Petroleum Institute told CNBC.

The energy sector is by far the worst-performing S&P 500 sector this year, with a loss of 47%. By comparison, the second-worst performer is financials, which is down 25%.

- CNBC's Thomas Franck contributed reporting.

Subscribe to CNBC PRO for exclusive insights and analysis, and live business day programming from around the world.