Image source: Marathon Oil. 

The price of crude seemed to run out of gas after touching $40 a barrel a couple of weeks ago, with a slump shortly after topping that mark. After a short breather, it made another run at $40 a barrel this week, rising 7% and closing at just over $39 per barrel. That rally was enough to restart the rebound in oil stocks, sending many up by double digits.

According to S&P Capital IQ data, among the best-performing energy stocks during this week were Whiting Petroleum (WLL), Rice Energy (NYSE: RICE), Marathon Oil (MRO 0.76%), Memorial Resource Development (NASDAQ: MRD), and Synergy Resources (SRCI).

For the most part, oil was the only fuel behind this week's rally. But Synergy Resources and Whiting Petroleum did have some positive analyst notes put out on them this week. In Synergy Resources' case, it was initiated at a buy, while Whiting Petroleum was one of nine "Goldilocks" oil stocks that should do well in the long term as long as oil stays around $35 per barrel this year. 

In some waysm analysts' calls also fueled the rallies in Marathon Oil, Memorial Resource Development, and Rice Energy. However, those calls were made the week before and seemed to be overlooked until oil started rallying.

To learn more about why these stocks moved so sharply, check out the following slideshow.