SAN BERNARDINO, Calif. — The couple who the police say killed 14 people and left 21 wounded here had stockpiled thousands of rounds of ammunition and a dozen homemade pipe bombs in their home, officials said Thursday, a sign that they might have been planning further attacks.

The F.B.I. is treating the Wednesday shooting as a potential terrorist act, though the agency is far from concluding that it was, two law enforcement officials said.

The suspects’ extensive arsenal, their recent Middle East travel and evidence that one of them had been in touch with people with Islamist extremist views, both in the United States and abroad, all contributed to the decision to refocus the investigation. But officials emphasized that they did not know what set off the attack, and said that they were not ready to call it terrorism.