For months, American consumers have kept the economy humming. While businesses pulled back, shoppers continued to spend.

But a prolonged surge in gasoline prices after the attacks on oil production facilities in Saudi Arabia could undermine that phenomenon and increase the risk of a recession.

“It’s clearly not a positive, and it adds a negative to the outlook,” said Steve Blitz, chief United States economist at T.S. Lombard, an independent research firm. “It’s another straw on the camel’s back.”

Monday’s nearly 15 percent spike in oil prices to $62.90 a barrel isn’t big enough to bring on a recession — it only returns crude prices to where they were this spring. And the economy expanded from 2011 to 2014 even when prices were above $100 a barrel.