SAN BERNARDINO, Calif. - California gunman Syed Rizwan Farook had been in contact with known Islamic extremists on social media, a U.S. intelligence official said Thursday, and police said he and his wife had enough bullets and bombs to slaughter hundreds when they launched their assault on a holiday party.

The details emerged as investigators tried to determine whether the rampage that left 14 people dead was terrorism, a workplace grudge, or some combination.

The husband-and-wife killers were not under FBI scrutiny before the massacre, said a second U.S. official, who likewise was not authorized to discuss the investigation and spoke on condition of anonymity.

Wearing black tactical gear and wielding assault rifles, Farook, 28, a county restaurant inspector, and his wife, Tashfeen Malik, 27, sprayed as many as 75 rounds into a room at a social-service center for the disabled, where Farook's coworkers had gathered for a holiday party Wednesday. Farook had attended the event but slipped out and returned in battle dress.

Four hours later and two miles away, the couple died in a furious gunbattle in which they fired 76 rounds, while 23 law officers unleashed about 380, police said.

On Thursday, Police Chief Jarrod Burguan offered a grim inventory that suggested Wednesday's bloodbath could have been far worse.

At the social-service center, the couple left three rigged-together pipe bombs with a remote-control detonating device that apparently malfunctioned, and they had more than 1,600 rounds of ammunition remaining when police killed them in their rented SUV, Burguan said.

At a family home in the nearby town of Redlands, they had 12 pipe bombs, tools for making more, and more than 3,000 additional rounds of ammunition, the chief said.

"We don't know if this was workplace rage or something larger or a combination of both," Attorney General Loretta Lynch said in Washington, echoing President Obama. "We don't know the motivation."

Investigators are trying to determine whether Farook, who was Muslim, became radicalized - and, if so, how - as well as whether he was in contact with any foreign terrorist organization, said the U.S. intelligence official, who was not authorized to discuss the matter publicly and spoke on condition of anonymity.

The same official said Farook had been in touch on social media with extremists who were under FBI scrutiny.

The second U.S. official said the FBI was treating the attack as a potential act of terror but had reached no conclusion that it was. The official said Farook's contacts online did not involve any significant players on the agency's radar and dated back some time, and there was no immediate indication of any surge in communication ahead of the shooting.

The official cautioned that such contact by itself doesn't mean someone is a terrorist.

Rita Katz, director of SITE Intelligence Group, an organization that tracks and analyzes extremists, said it hasn't found any connection between Farook and jihadi groups. But she also said that some of Farook's social media posts seem to have been deleted before the attack.

Wednesday's rampage was the nation's deadliest mass shooting since 2012, when 26 children and adults were slain in Newtown, Conn.

In San Bernardino, a Southern California city of 214,000, the victims ranged in age from 26 to 60. An additional 21 people were injured, including two police officers, authorities said. Two of the wounded remained in critical condition Thursday.

Authorities said the attack was carefully planned.

"There was obviously a mission here. We know that. We do not know why. We don't know if this was the intended target or if there was something that triggered him to do this immediately," David Bowdich, assistant director of the FBI's Los Angeles office, said as the bureau took over the investigation.

Adam Lankford, a criminal justice professor at the University of Alabama, said his review of mass public shootings in the U.S. indicates this is the first one in recent history involving a male-female team.

Farook was a devout Muslim who prayed every day and recently memorized the Quran, according to brothers Nizaam and Rahemaan Ali, who attended Dar Al Uloom Al Islamiyah mosque in San Bernardino with Farook.

Rahemaan Ali said he last saw Farook three weeks ago, when he abruptly stopped going to the mosque. Ali said Farook seemed happy and his usual self, and the brothers never saw a violent side.

"He never ever talked about killing people or discussed politics, or said that he had problems at work," Rahemaan Ali said. "He always had a smile on his face."

Coworker Patrick Baccari said that until the rampage, Farook showed no signs of unusual behavior and was a reserved young man.

Baccari said he was sitting at the same table as Farook before Farook suddenly disappeared, leaving his coat on his chair. Baccari was in the restroom when the shooting started; he suffered minor wounds from shrapnel slicing through the wall.

Federal authorities said that Farook legally bought two handguns used in the massacre and that the couple's two assault rifles were legally bought by someone else. Authorities did not say how the rifles got into the attackers' hands.