ANAHEIM, Calif. — On Wednesday morning, Syed Rizwan Farook and his wife, Tashfeen Malik, left their 6-month-old daughter with Mr. Farook's mother, telling her they were dipping out for a doctor's appointment, a relative said.
By nightfall, it was clear that was a ruse, as the police said the couple spent the day carrying out a rampage at a social services center that killed at least 14 people before leading officers on a sprawling chase that ended with the two dead in a bloody gunfight in a suburban neighborhood.
Before the attack, Mr. Farook, 28, who was born in Illinois and whose parents are from Pakistan, joined colleagues at an annual holiday party for the San Bernardino County Public Health Department, where he has worked for five years as an environmental inspector, officials said. He had attended the same party the year before, and he did not appear out of place.
Soon, however, he stormed out in anger. The nature of the dispute was not clear, but when he returned with his wife, 27, both of them were dressed in tactical gear and carrying assault rifles, officials said. That level of preparation is among the factors investigators are weighing as they examine a motive for the attack.
Chief Jarrod Burguan of the San Bernardino Police Department said at a news conference that the attack did not seem to be "a spur-of-the-moment thing."
A picture began to emerge on Wednesday night of how the couple hid their plan from even close relatives, as Mr. Farook's brother-in-law held a news conference here in Anaheim during which he expressed sorrow for the victims and bafflement at what had driven the couple to commit such a crime.
"I have no idea why would he do that," said the brother-in-law, Farhan Khan, who last spoke to Mr. Farook a week ago. He added: "I have absolutely no idea. I am in shock myself."
It was hours after Mr. Farook and his wife had left their baby with Mr. Farook's mother, whose name was not released, that she learned there had been a shooting at his work party, said Hussam Ayloush, the executive director of the Council on American-Islamic Relations in Los Angeles, which helped organize the news conference with Mr. Khan. At first, the baby's grandmother was tense with concern about her family.
Then she received a call — her son had been named as a suspect.
Mr. Ayloush urged people not to jump to conclusions regarding a motive. "Is it work?" he said. "Rage-related? Is it mental illness? Extreme ideology?"
The authorities could not offer an answer either, with Chief Burguan saying that he was not aware of the suspects having any previous contact with law enforcement.
He added, "We have not ruled out terrorism."
The authorities on Wednesday night used robots to sweep a townhouse where Mr. Farook lived with his mother and disposed of explosive devices left at the scene of the attack.
Mr. Farook inspected restaurants, bakeries and public swimming pools for the county department, according to inspection reports. Among his duties were checking chlorine levels, screening hand-washing facilities and making sure food surfaces were clean. He is registered as an environmental health specialist with the California Department of Public Health, state records indicate.
His name appears on a county inspection report as recently as Oct. 1 for Cuca's Mexican Restaurant in Rialto, Calif. The restaurant's employees said Wednesday night that they did not remember him. Online records indicate he was paid about $70,000 a year.
He had been married to Ms. Malik for two years.