U.S. regulators are sounding the alarm about banks’ exposure to oil-and-gas producers, a move that could limit their ability to lend to companies battered by a yearlong slump in prices.

The Federal Reserve, Office of the Comptroller of the Currency and Federal Deposit Insurance Corp. are telling banks that a large number of loans they have issued to these companies are substandard, said people familiar with the matter, as they issue preliminary results of a joint national examination of major loan portfolios.

...