After several years of very little progress, Brazil is finally beginning to extract oil from ultra-deep water. It’s a welcome development for the South American country, which has experienced four years of flat oil production.

Brazil’s economy grew at an astounding pace from 2005 to 2010, thanks to a commodity boom that sent exports of things like soy, beef and iron ore soaring. Brazil had already been a major oil exporter for years, but things really took off after the discovery of a massive deposit of offshore oil in 2007. After that, the country set its sights on becoming one of the top producers in the world.

The discovery of billions of barrels of oil underneath a thick layer of salt presented significant engineering and financing challenges, but a wave of excitement swept through the country. The quasi-state-owned oil company Petrobras issued ambitious production targets -- predicting oil output would hit 5 million barrels per day by 2020, more than double the current rate.

Brazil began to fight over the riches before any oil was even pulled from the pre-salt. The government passed a law in March 2013 that allocated a greater share of revenue to non-oil-producing states. This angered the state government of Rio de Janeiro, because some of the biggest fields are located in its waters.

While the revenue fight played out on land, Petrobras soon ran into trouble offshore. Drilling through the salt crust beneath the seabed proved harder than it anticipated. The oil fields are located in ultra-deep water – nearly 20,000 feet below the surface of the sea. Once they reach that depth, operators must then drill through a layer of salt that can be more than a mile thick.

The extreme challenges of getting at the oil have forced Petrobras to invest billions in new equipment and advanced technology, and even still, it has run into delays. From 2010 onwards, Brazil’s oil production flattened out, after years of increases.

As costs ballooned and project deadlines slipped, Petrobras racked up enormous debt, so much so that it has been called the world’s most indebted major oil company.

Brazil’s economy stagnated around the same time, fueling discontent among the general population. Optimism gave way to unease and frustration as the cost of living continued to climb and consumer confidence plummeted. Petrobras’ problems became a symbol of the country’s broader woes.

Now Petrobras may be turning a corner. New data shows that production from the pre-salt jumped from essentially nil to 520,000 barrels per day in July. The turnaround is critical for the company, which has seen most of its other wells reach maturity. Many are already beginning to decline.

As the Wall Street Journal noted, Brazil’s largest oil field saw its output drop from 395,000 barrels per day in 2010 down to its current level of 256,200 barrels per day. Petrobras’ annual production slipped in both 2012 and 2013, but it expects to rebound this year.

Still, the target of 5 million barrels per day by the end of the decade is probably overly optimistic. Oil analysts project a more modest production level of 4 million barrels per day in that timeframe. But even reaching that level of output would be a notable achievement for the company, and it would be enough to make Brazil one of the world’s five largest oil producers.

Despite the news about rising production from the pre-salt, Petrobras will need to overcome a lot of hurdles to get there. The company has to sell gasoline at below market rates by government decree, in order to fight the effects of inflation. Mandates on the use of local content in drilling projects has raised costs and scared away investors. Petrobras’ stock price has dropped by around 75 percent since hitting a high in 2008, and it has declined each of the last five years as debt piled up.

But the biggest problem facing Petrobras is one of engineering. The pre-salt is arguably the most challenging environment to work in for any oil company. Still, there is finally some evidence that Petrobras is making progress.

By Nick Cunningham of Oilprice.com