In this Tuesday, Feb. 2, 2020, file photo, pump jacks operate in an oilfield as the sun begins to set on the horizon in Midland, Texas. Energy companies spent the first quarter of 2021 recharging after a draining year amid the coronavirus pandemic. (Jacob Ford/Odessa American via AP, File)

Energy companies spent the first quarter of 2021 recharging from a draining year. Wall Street expects that growth to continue as energy companies and many of the other companies beaten down by the virus benefit from the vaccine push aimed at bringing the pandemic to an end.

Marathon Oil, Exxon Mobil and other stocks in the sector have jumped as the economy recovers from the virus pandemic, driving demand for oil.

Analysts polled by FactSet expect the energy sector to make overall stock gains of up to 45% this year, based on current median target prices. That would make the sector the biggest gainer of the year, far outpacing 20% gains expected in the technology sector.

The energy sector is already the biggest gainer in the S&P 500 so far this year, rising nearly 30%, while the broader index is only up about 5%. The gains mark a sharp turnaround from last year, when the sector shed 37% of its value as people stopped traveling and commuting to work. Their profits disappeared, with many swinging to a loss.

"Investors are coming around to the fact that the recovery is going to be pretty robust," said Brian Levitt, global market strategist at Invesco. "What we're seeing is very much aligned with what you would expect in a recovery trade."

OPEC is also maintaining its production cuts to support prices as demand recovers. It cut production by 9.7 million barrels per day after the pandemic hit last year, but eased that to 7.7 million barrels per day by the end of 2020.

That's helped lift oil prices 20% in 2021, a sharp turnaround from last year's 20% drop. Oil prices are now back to pre-pandemic levels.

Oil producers are expected to continue benefiting from the tighter global supply of oil at a time of increasing demand. Most OPEC oil cartel countries are leaving voluntary production cuts in place through April.

Global oil consumption has just about returned to its pre-pandemic levels and is expected to steadily rise through the rest of 2021 and 2022, according to the U.S. Energy Information Administration. It expects production cuts from OPEC to ease beginning in May, which could temper oil prices moving into the second half of the year.

"They (OPEC) can easily open the valve and they will at some point," said David Lefkowitz, head of Americas equities at UBS Global Wealth Management.

A continued slump in air travel is still holding back a bigger increase in oil demand and OPEC will likely time the resumption of full production with that demand, he said. Meanwhile, many U.S. companies are focusing on cutting costs and building up cash reserves instead of investing in production.

Marathon Oil told investors in February that even if stronger crude oil prices hold, it will continue to focus on its cash flow and cost cuts. Exxon Mobil said it is also pacing its investments to build up a cash cushion.