Shares of BP (LSE: BP) slipped 2% lower this morning, after the group reported an underlying replacement cost profit of $720m for the second quarter. That’s much more than the $532m BP reported for the first quarter of 2016, but slightly below analysts’ forecasts of $839m.

The quarterly dividend remains unchanged at $0.10 per share, suggesting that the 6.8% forecast yield for 2016 is now safe. Meanwhile, the liabilities resulting from the Deepwater Horizon disaster have now been capped at $61.6bn, after a final impairment charge of $5.2bn.

What next for BP?

BP shares have performed strongly this year. They’re currently worth 22% more than at the start of January.

It seems likely that the worst of the oil crash is over. Falling production in the US and elsewhere suggests to me that the oil market is now starting to rebalance. BP chief executive Bob Dudley was clearly right to warn investors last year that prices could stay lower for longer than expected. But I think fears that oil will stay below $50 indefinitely are unfounded.

At some point oil stocks will start to fall. Oil futures prices will then rise to reflect the need for new production to replace declining fields. I think a medium-term price of $50-$60 per barrel is likely.

BP said today that it expects to achieve cash flow break-even at $50-$55 per barrel in 2017. I suspect this will be enough to ensure that the dividend remains safe. However, net debt has risen from $24.8bn to $30bn over the last year. I’d hope to see net debt peak within 12 months, otherwise it could become a concern.

Time to look for growth?

The last five years have been a period of retrenchment for BP. The Deepwater Horizon disaster in 2010 was followed by the oil market crash in 2014/15. But despite this, BP has managed to generate about $60bn of cash to fund the liabilities resulting from Deepwater Horizon.

With these costs now tailing off, BP should be able to use its cash-generating assets and lower cost structure to fund new growth and secure the dividend.

Today’s update made it clear that growth is now on the cards again, albeit at a controlled pace. By the end of next year, BP expects to have 500,000 barrels per day of new production on-stream. This total should rise to 800,000 bopd by 2020.

Is BP still a buy?

When BP was trading at about 350p earlier this year, I said that I rated the shares as a strong buy. Shareholders — including me — have enjoyed strong gains since then. My view now is that BP shares could struggle over the next few months, until we see further evidence that the oil market is recovering.

However, I think that on a longer timescale, BP’s current valuation remains attractive. The 6.8% forecast yield seems likely to remain safe. BP’s 2017 forecast P/E of 14 isn’t especially demanding, given the depth of the oil market crash from which we’re now emerging.

Significant earnings growth should be possible over the next two-to-three years. I plan to continue holding my BP shares.

Don't miss this income opportunity

If you already own shares of BP, then you may be interested in another income opportunity that's been uncovered by our expert analysts.

The company in question is smaller than BP, but has an attractive yield and a modest valuation. The Fool's experts believe the stock may be undervalued at current prices.

You can find full details of this exciting business in A Top Income Share From The Motley Fool. This exclusive new report is completely free and carries no obligation.

To download your copy, just click here now.

Roland Head owns shares of BP. The Motley Fool UK has recommended BP. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.