President Trump promised the U.S. would curtail oil output in a pact with major producers over the weekend. There isn’t much for him to do: The dismal economics and strained physics of the oil market are causing U.S. producers to shut down themselves.

Canceled orders were mounting amid the sharp drop in fuel demand when Texland Petroleum LP decided to shut in each of its 1,211 oil wells and cease production by May.

“We’ve never done this before,” said Jim Wilkes, president of the 7,000-barrel-a-day Fort Worth, Texas, firm, which has weathered oil busts since 1973. “We’ve always been able to sell the oil, even at a crappy price.”

Despite the agreement between Mr. Trump, Saudi Arabia and Russia aimed at buoying prices, West Texas Intermediate, the main U.S. price gauge, closed Monday 1.5% lower at $22.41 a barrel.

The U.S. benchmark is down 63% this year and prices have been even worse in Midland, Texas, where a lot of oil extracted from the Permian Basin is priced, and in western Canada, from which most of the country’s output comes. Oil has traded below $10 a barrel in both markets.

For Texland, low prices and balking buyers gave it no choice but to shut in its wells. The company told state regulators its plans and applied for a loan through the Small Business Administration’s Paycheck Protection Program to keep its 73 employees on payroll.

From the West Texas desert, where oil is blasted from deep shale formations, to the wilds of western Canada, where multibillion-dollar steam plants bubble thick crude from the earth’s crust, energy producers are resorting to the desperate measure of shutting in productive wells.