The FBI is investigating this week's massacre in which a married couple killed 14 people in California as an "act of terrorism," an official said on Friday, saying the female shooter had pledged allegiance to a leader of the militant group Islamic State.

Tashfeen Malik, 27, a native of Pakistan who lived in Saudi Arabia for more than 20 years, and her U.S.-born husband, Syed Rizwan Farook, 28, were killed in a shootout with police hours after the Wednesday massacre during a holiday party at the Inland Regional Center social services agency in San Bernardino, about 60 miles east of Los Angeles. The attack was the deadliest mass shooting the United States has experienced in three years.

RELATED: California shooting: Names of 14 victims released

Malik had pledged allegiance to Islamic State leader Abu Bakr al-Baghdadi in an online post, David Bowdich, assistant director of the Federal Bureau of Investigation's Los Angeles office, said at a news conference.

That finding could be a "game changer" in the investigation, two U.S. government sources told Reuters. Another source cautioned there was no indication of evidence that Islamic State "even knew" who the shooters were.

"Based on the information and the facts as we know them, we are now investigating these horrific acts as an act of terrorism," Bowdich said.

Asked about a reported Facebook post by Malik on the day of the attack pledging loyalty to Islamic State, Bowdich said, "Yes, there was a pledge of allegiance."

Investigators have determined that the Malik and Farook engaged in extensive planning before the attack, he said.

RELATED: Twitter reacts to Texas politician's 'reimagined' NY Daily News cover

Bowdich also said the FBI also was examining crushed cellphones found near the shooting scene and had established that there were "telephonic connections" between the couple and other people of interest in FBI probes.

The couple had two assault-style rifles, two semi-automatic handguns, 6,100 rounds of ammunition and 12 pipe bombs in their home or with them when they were killed, officials said.

Bowdich said the couple may have been planning an additional attack, Bowdich said.

Farook, born in Illinois to Pakistani immigrant parents, worked as an inspector for the San Bernardino County Department of Environment Health, the agency whose holiday party he and Malik attacked on Wednesday.

Investigators are looking into a report that Farook had an argument with a co-worker who denounced the "inherent dangers of Islam" prior to the shooting, a U.S. government source said.

While the attack may have been inspired by Islamic State, there is no evidence that it was directed by the militant group, U.S. government sources said. Islamic State, which has seized large parts of Syria and Iraq, took claim for the Nov. 13 attacks in Paris in which gunmen and suicide bombers killed 130.

The couple's landlord in the town of Redlands opened their townhouse to media on Friday, leading to a flurry of reporters and camera crews surveying the scene. The landlord later asked media to leave.

The FBI's search of the home turned up no evidence to suggest they had been working with any foreign militant group, a U.S. government source said.

PROBE EXTENDS TO PAKISTAN

Pakistani intelligence officials have contacted Malik's family in her homeland as part of the investigation, a family member said.

"I only found out about this tragedy today when some intelligence officials contacted me to ask me about my links with Tashfeen," Malik's uncle, Javed Rabbani, said in an interview. "I had heard in the news that this tragedy had taken place but I could never even imagine that it would be someone from my family. Of course, we are in shock."

He said his brother, Malik's father, had become considerably more conservative since moving with his family to Saudi Arabia a quarter century ago.

Tashfeen Malik had not come to the attention of authorities while living in Saudi Arabia, according to a source close to the Saudi government. She had moved back to Pakistan five or six years ago to study pharmacy, Pakistani officials said.

Christian Nwadike, who worked with Farook for five years, told CBS that his co-worker had been different since he returned from Saudi Arabia.

"I think he married a terrorist," Nwadike said.

Twenty-one people were wounded in the attack, the worst gun violence in the nation since the December 2012 shooting at Sandy Hook Elementary School in Newtown, Connecticut.

Farook had not been under surveillance by the FBI or any other law enforcement agency, Bowdich said, adding that there was no evidence that additional threats lingered following the shooting.