WASHINGTON — On the day she and her husband killed 14 people and wounded 21 others in San Bernardino, Calif., a woman pledged allegiance to the Islamic State in a Facebook post, officials said Friday, as the F.B.I. announced that it was treating the massacre as an act of terrorism.

“The investigation so far has developed indications of radicalization by the killers, and of potential inspiration by foreign terrorist organizations,” the F.B.I. director, James B. Comey, said at a news conference here. But he said that investigators had not found evidence that the killers were part of a larger group or terrorist cell. The couple died in a shootout with the police on Wednesday.

“There’s no indication that they are part of a network,” he said.

The Islamic State said in an online radio broadcast on Saturday that two of its followers had carried out the attack, Reuters reported. “Two followers of Islamic State attacked several days ago a center in San Bernadino in California,” said the statement, issued on the group’s daily broadcast al-Bayan.

The woman, Tashfeen Malik, declared allegiance to the Islamic State on Facebook at roughly the time of the shooting on Wednesday, a Facebook spokesman said. At a news conference in San Bernardino, David Bowdich, the F.B.I. assistant director in charge of the Los Angeles office, said he was aware of the post, which was taken down by Facebook on Wednesday, but he would not elaborate.

Image Tashfeen Malik

“There’s a number of pieces of evidence which has essentially pushed us off the cliff to say we are considering this an act of terrorism,” he said.

The attack is the deadliest Islamic State-inspired attack on American soil. Al Qaeda and other groups have carried out — or inspired — lethal assaults in the United States, but the Islamic State, which has a base of operations in Syria and Iraq, and carried out the attack on Paris that killed 130 people last month, has turned into a leading terrorism threat with spreading influence around the world.

What began as a local police response to gunfire in San Bernardino turned into a global investigation into the deadliest terrorist assault in the United States since the Sept. 11, 2001, attacks, an inquiry being headed by the F.B.I. and stretching from California to Saudi Arabia and Pakistan. It is also the nation’s worst mass shooting in almost three years, since the slaughter at an elementary school in Newtown, Conn.

Early this year, the Islamic State shifted tactics, and instead of just trying to persuade followers to travel to Syria to join the group, it began calling on sympathizers in the West to commit acts of violence at home. The F.B.I. has refocused its resources on that threat of so-called homegrown, self-radicalized extremists who might be inspired by Islamic State propaganda. Even before the Paris attacks, the bureau had heavy surveillance on at least three dozen people who the authorities feared might commit violence in the Islamic State’s name.