After years of declining output, major oil companies have ramped up crude production this year, just as they are being hit by a plunge in prices due to already excessive supplies.

Executives have taken pride in seeing billions of dollars’ worth of investments in new technologies and new fields in such places as Brazil, the North Sea and West Africa kick in and boost output.

But most of the investment was made three to five years ago when oil was about $100 a barrel, around double current levels. Now, new production is contributing to a glut in supply due mostly to the North American shale boom, a faltering global economy and OPEC’s decision not to cut output.

Recent third-quarter results show the scale of the problem.

According to Reuters calculations, oil production from nine of the world’s largest oil and gas producers rose a combined 8 percent in the first nine months of the year to more than 10 million barrels per day for the first time since 2013.

With low prices pushing some companies into the red, oil majors have had to rein in growth plans.

“The priority for these companies is to achieve cash flow neutrality, and investment will be pulled back, in order to achieve that where possible,” said Tom Ellacott, head of ­corporate upstream analysis for Wood Mackenzie.

Global oil output this year is expected to rise by a record 2.4 million barrels per day from 2014, driven mainly by U.S. shale oil output, Iraq production and Brazil, according to Wood Mackenzie.

But it is not only new production. Oil companies have in recent years invested in technology to squeeze the maximum out of existing fields.

The natural decline rate of oil fields operated by Shell decreased to 3 percent per year in 2015 from 4.5 to 5 percent several years ago, according to Chief Financial Officer Simon Henry.

“It is remarkable to see how the focus on production excellence is really beginning to come through and is transforming the quality of the operations,” Shell CEO Ben van Beurden said during an analyst call.