Wall Street ended the week with a bang, rocketing to session highs on the back of another crude oil surge. 

Stocks closed out their fourth straight week of gains. The S&P 500 rose 1.6% on Friday, trading above 2,000 again. The Dow Jones Industrial Average added 1.3%, and the Nasdaq was up 1.9%, pulling out of correction territory.

Crude soared on a one-two punch of good news. The number of active U.S. oil rigs fell to its lowest level on record, with data from Baker Hughes showing a decline of nine rigs, leaving the total at 480, the 12th straight weekly decline.

Crude was already higher after a report from the International Energy Agency indicated spiraling prices may be coming to an end. The energy watchdog said markets would likely not see a recovery until 2017, but that recent signs signal that stabilization is possible.

The IEA pointed to "possible action by oil producers to control output; supply outages in Iraq, Nigeria and the UAE; signs that non-OPEC supply is falling; no reduction in IEA's forecast of oil demand growth; and recent weakness of the U.S. dollar" as possible forces that could stabilize prices.

Oil prices have slowly recovered in recent weeks after hitting a panicked low in February of about $26 a barrel. West Texas Intermediate crude oil closed 1.7% higher at $38.50 a barrel, its best settlement since December.

The energy sector was the best performer on markets Friday. Major oilers PetroChina (PTR) , Royal Dutch Shell (RDS.A) , Total (TOT) and BP (BP) were higher, while the Energy Select Sector SPDR ETF (XLE) added 2.6%.

Equities were also higher in what appeared to be a delayed reaction to the European Central Bank's latest stimulus moves. Good vibes had quickly soured on Thursday after ECB President Mario Draghi made clear that additional rate cuts were unlikely.

"From today's perspective and taking into account the support of our measures to growth and inflation, we don't anticipate that it will be necessary to reduce rates further," Draghi said at a press conference.

Wall Street looked toward its own central bank's March meeting next week. The Federal Reserve will convene for a two-day meeting on Tuesday with an announcement and press conference set for Wednesday afternoon. The majority of economists do not expect the Fed to increase rates at this meeting.

The trade sector was again hit by weaker energy prices in February. Import prices fell 0.3% last month, their eighth straight month in decline, according to the Labor Department. Export prices slid 0.4%. Excluding energy, import prices fell 0.1%. Import prices have fallen 6.1% over the past 12 months, contributing to weaker U.S. inflation.

In earnings news, Bojangles (BOJA) rose 24% after reporting quarterly earnings of 22 cents a share, 3 cents above estimates. Same-store sales increased 0.6%.

El Pollo Loco (LOCO) fell 8.2% after issuing weaker-than-expected guidance for 2016. The chicken chain also reported disappointing quarterly sales of $86.3 million, below a forecast $90 million. El Pollo Loco said recent sales initiatives would take time to gain momentum.

More from Markets

Three Big Factors That Rocked the Stock Market Tuesday

Three Big Factors That Rocked the Stock Market Tuesday

Dow Tumbles Over 400 Points; S&P 500 and Nasdaq Also Finish Lower

Dow Tumbles Over 400 Points; S&P 500 and Nasdaq Also Finish Lower

Caterpillar Bulldozes Industrial Sector With Bad News on Earnings Call

Caterpillar Bulldozes Industrial Sector With Bad News on Earnings Call

Jim Cramer: If You're Afraid of the 10-Year Yield, Go to Cash

Jim Cramer: If You're Afraid of the 10-Year Yield, Go to Cash

Eli Lilly CEO Expresses Confidence in New Rheumatoid Arthritis Drug

Eli Lilly CEO Expresses Confidence in New Rheumatoid Arthritis Drug