HOUSTON — The American oil industry may have dodged a bullet.

Russia and Saudi Arabia — which only a month ago hoped to undercut American producers — have retreated from threats to pump more oil into the already-saturated market. Acknowledging that the gamble was hurting themselves as well, they instead announced this past week that they had tentatively agreed to cut production.

The change in course would give American companies room to gradually reduce production on their own terms, without government or regulatory mandates, as they invest far less in exploration and production.

“Hopefully, the American oil industry has avoided a worst-case scenario,” said Amy Myers Jaffe, an energy and Middle East expert at the Council on Foreign Relations. “There still will be bankruptcies, but for the time being, the fears that there would be a wholesale destruction of the industry can now be put aside, because the worst of the price war has passed.”

What happened in recent days may support an industry that directly and indirectly employs nearly 10 million Americans. The surge in U.S. production in recent years has reduced dependence on foreign oil, and lowered prices at the gas pump for consumers.