Tumbling oil prices are dimming one of the few big bright spots that banks have enjoyed since the financial crisis.
Banks have been lending hand over fist to companies in the nation's energy industry, underwriting bonds, advising on mergers, even financing the building of homes for oil workers. All of this has provided a boon to banks that have been struggling to find more companies and consumers wanting to borrow.
Read MoreHere's a trend that will be a surprise this year
Yet with the price of crude oil falling below levels sufficient for some energy companies to service their huge debts, strains are being felt and defaults are likely. While it may take some time for the crunch in the oil industry to translate into losses, one thing already seems clear: The energy banking boom is over.
"At the least, you are talking about a slowdown in loan growth for the banks in the energy-producing states," said Charles Peabody, a banking specialist at Portales Partners. "That, we feel pretty strongly about."
Mr. Peabody covered Texas banks in the 1980s, when a slump in the energy business helped cause large losses at the lenders, and banks to collapse or be rescued. He says he expects the current problems for energy companies to lead to losses, too.
More from The New York Times:
Former Prosecutor to Join Debevoise & Plimpton
Roche to Buy Majority Stake in Foundation Medicine
Fund Said to Be Near Deal to Acquire Bruno Magli
"We do believe that you will start to see some defaults," he said.
This week, as many of the largest banks report their earnings for the final three months of 2014, investors will press the banks for answers on how a sudden slump in the once-roaring oil and gas industry may hurt their bottom lines.
The expected slowdown comes as banks, both big and small, have finally dug out from the wreckage of the financial crisis and have been looking for new ways to bolster their revenues.
Read MoreOil'snew normal is lower for longer: Goldman
When times are good, the capital-intensive oil business is a banker's dream. From new wells dug in North Dakota and Texas to the oil patch of Alberta, oil producers have turned to Wall Street and local banks to help them sell billions of dollars in bonds, raise equity and arrange lines of credit.
"It's been a hot industry, probably a little too hot," said Dick Evans, chief executive of Cullen/Frost Bankers of Texas, which has a relatively sizable energy practice. "But it is not time to panic. We have been in the game a long time. I am comfortable with what we have been doing."
There is a flip side to lower oil prices that helps the banks, or at least those with large consumer businesses. The less cash consumers have to spend filling up their gas tanks or heating their homes, the more emboldened they may feel to sign up for a credit card or take out a mortgage.
Read MoreGas slump fuels tax hike talk
"As consumers have more money in their pocket, surely that helps Wells Fargo," the chief executive of that bank, John G. Stumpf, said at a financial services conference last month. "I would say net-net this is a good thing for the country."
Still, if oil prices remain near $50 a barrel for long, economists and industry analysts expect a sharp deceleration in production this year, idling energy bankers and cutting into their lucrative fees.
Two of the banks that may be the hardest hit by lower investment-banking fees are among the biggest. Wells Fargo derived about 15 percent of its investment banking fee revenue last year from the oil and gas industry, while at Citigroup, the business accounted for roughly 12 percent, according to the data provider Dealogic.
At some of the larger banks in Canada, a slowdown in fees could be even more pronounced. At Scotiabank, about 35 percent of its investment banking revenue came from oil and gas companies last year.
And Wall Street firms that financed energy deals may now have trouble offloading some of the debt, as they had originally planned.
Morgan Stanley, for instance, led a group of banks that made $850 million of loans to Vine Oil and Gas, an affiliate of Blackstone, a private equity firm. Morgan Stanley is still trying to sell the debt, according to a person briefed on the transaction. Similarly, Goldman Sachs and UBS led a $220 million loan last year to the private equity firm Apollo Global Management to buy Express Energy Services. Not all the debt has been sold to other investors, according to people briefed on the transaction.
A precipitous drop in oil prices can quickly turn loans that once seemed safe and conservatively underwritten into risky assets.
The collateral underpinning many energy loans, for example, is oil that was valued at $80 a barrel at the time the loans were made. As oil has dropped well below that price in recent months, the value of the bank's collateral has sunk.
Many oil companies have bought hedges on oil prices, which are providing lenders with additional cushion. But when those hedges expire, and if oil prices remain low, the banks may need to reserve money against the loans.
"At $50 a barrel, things can get a bit testy," said Christopher Mutascio, a banking analyst with Keefe, Bruyette & Woods.
Some of the greater risks may be the loans the banks have extended to the many kinds of services companies that work in and around the oil industry. Some of these services companies, lured by the boom, may have short track records, analysts say.
Low oil prices can have ripple effects that many banks may not anticipate, particularly in states such as North Dakota and Oklahoma where energy is a large driver of the economy.
When oil prices crashed in the 1980s, many Texas banks failed not because of loans to oil producers, but because of loans to local real estate developers who had been caught in the energy bust.
Read MoreOil sector in dire straits: Schork
Just over 20 percent of the loans at MidSouth Bank, based in Lafayette, La., are to oil and gas companies, a high proportion relative to its peers. But Rusty Cloutier, MidSouth's chief executive, said the bank had focused its lending on services companies with seasoned management that were most likely prepared for a dip in activity.
"Our companies understand that they ride the crest, the up and the down," Mr. Cloutier said. "We are not panicking."
Mr. Stumpf of Wells Fargo also expressed confidence in his bank's ability to weather a downturn. Energy loans make up about 2 percent of the bank's loans.
"Some marginal producers will get challenged in this, but this is not something new to them," he said last month. "Cycles like this happen, so industry will be able to work through this."
Investors in the junk bond market — of which energy companies account for an estimated 18 percent, according to JPMorgan Chase — are not so optimistic.
Read MoreHow much you'll save this year thanks to oil's fall
Junk bonds issued by energy companies are signaling a jarring jump in the number of defaults in the coming months. Martin S. Fridson, chief investment officer at Lehmann Livian Fridson Advisors, said the yields on energy junk bonds appeared to be predicting that 6 percent of the bonds would default this year, and even more in 2016.
"As far as the high-yield market is concerned, the energy sector is in a recession," Mr. Fridson said.