UNITED NATIONS — The Obama administration said Wednesday it now thinks the attack that killed the U.S. ambassador to Libya was linked to an affiliate of al Qaeda — an evaluation that comes two weeks after the strike and as the White House has struggled to defend its initial read on the situation.

Secretary of State Hillary Rodham Clinton, speaking at the U.N., said the Sept. 11 attack on a U.S. diplomatic post was part of a broader effort by “al Qaeda in the Islamic Maghreb and other groups,” who she said are “working with other violent extremists to undermine the democratic transitions under way in North Africa, as we tragically saw in Benghazi.”

“We’re working with the Libyan government and other partners to find those responsible for the attack on our diplomatic post in Benghazi and bring them to justice,” she said at a special meeting about security in the Sahel region in Africa.

President Obama himself has yet to call the attack “terrorism,” though others in the White House have done so.

Previously, officials had only said they were looking into potential links with al Qaeda, but Mrs. Clinton’s statement Wednesday appears to confirm those ties — something both Democrats and Republicans in Congress had predicted from the beginning.

Indeed, the White House has been on the defensive over its handling of the Benghazi attack on a diplomatic post that killed Ambassador J. Christopher Stevens and three other Americans as well as the mob assaults on U.S. embassies in Egypt and Yemen over an Internet video critical of Islam.

American outposts throughout the Muslim world, from Morocco to Malaysia, have been targeted by demonstrations since a video trailer appeared on YouTube touting “Innocence of Muslims.” Dozens of people have been killed in clashes between demonstrators and local authorities.

Mr. Obama came under fire from abroad Wednesday for not suppressing the amateurish video.

Hafiz Saeed, a prominent Pakistani firebrand, told Reuters news service Mr. Obama should have ordered the video — which refers to Muhammad, Islam’s prophet, as a pedophile, womanizer and murderer — be removed from the Internet instead of defending America’s freedom of expression, as he did in his U.N. speech.

“Obama’s statements have caused a religious war,” he told Reuters in an interview.

Top Republicans said Mrs. Clinton’s admission of al Qaeda links came so late that it raised serious questions about Mr. Obama’s ability to lead the war on terrorism.

“It is not too much to ask why the president and his administration have taken so long to state what has appeared obvious for a long time about what really happened in Benghazi,” Republican Sens. John McCain of Arizona and Lindsey Graham of South Carolina said in a joint statement. “This is just one more example of this president’s failure to lead in the Middle East and how that failure has threatened America’s national security interests.”

Libya’s leaders have also blamed al Qaeda-linked groups for the attack in Benghazi, which came on the 11th anniversary of the Sept. 11, 2001, terrorist attacks on the World Trade Center and the Pentagon.

In the days immediately following the attack, Benghazi residents told The Washington Times that the protest outside the U.S. Consulate against the then little-known anti-Islam film was initially a peaceful one, but the protesters were quickly joined by armed men carrying rocket-propelled grenades. These accounts added credence to the theory that the attack was planned by a sophisticated terrorist group.

The protests in Egypt and elsewhere in the Muslim world appear to have been spurred by the “Innocence of Muslims” video, but Libyan President Mohammed el-Megaref told NBC News on Wednesday that film had “nothing to do with” the attack in his country. That contradicts Mr. Obama’s statements to the U.N. a day earlier.

But the White House on Wednesday continued to defend its previous statement that the attack was an opportunistic strike prompted by the video rather than a long-planned operation against the U.S.

White House press secretary Jay Carney told reporters traveling with the president on the campaign trail in Ohio that the U.S. counterterrorism chief’s assessment was that the attackers seized a chance that was opportunistic, rather than a long-planned assault.

Lawmakers from both parties on Capitol Hill have called for the administration to release more details about security at diplomatic posts after the Benghazi and Cairo attacks.

In addition, eight House Republican committee chairmen, including the leaders of the Intelligence and Armed Services committees, are demanding a new briefing “as soon as possible” from the Obama administration on the Libyan attack, criticizing the administration for having a “pre-9/11 mindset” in responding to the attacks and scolding Mr. Obama for failing to label it terrorism.

“Decades after al Qaeda attacked our embassies in East Africa, which catalyzed a series of events that led to the attacks on 9/11, it appears they executed a highly coordinated and well-planned attack against us again,” the letter said. “Clearly, the threat from al Qaeda and affiliated groups has metastasized; yet we do not appear to be learning from the past.”

Mr. Carney told reporters the administration has provided “as much information as it has been able to” about the Libya attack, but said there are FBI and State Department investigations going on, and they must be allowed to do their work.

For his part, Mr. Obama, campaigning in Ohio on Wednesday, stuck to his stump speech, saying that al Qaeda is “on the path to defeat” and that Osama bin Laden is dead.

He also acknowledged that the attacks of “just a few days ago” show that Americans “still face some serious threats in the world.” But he did not label the attacks terrorism.

On Tuesday, speaking to the U.N., Mr. Obama tried to strike a balance between criticizing the anti-Islam film, which he called “crude and disgusting,” and defending American rights of free expression.

“I know there are some who ask, ‘Why we don’t just ban such a video?’ The answer is enshrined in our laws: Our Constitution protects the right to practice free speech,” he said.

The worldwide backlash against “Innocence of Muslims” spread Wednesday, as Turkey and Brazil imposed restrictions on the video clips.

A Turkish court agreed Wednesday to let authorities block access to the film, according to the country’s communications minister. Binali Yildirim told the state-run TRT network that the film was “disgusting” and a “hate crime.”

Meanwhile, Judge Gilson Delgado Miranda agreed Wednesday with Brazil’s National Union of Islamic Entities that “Innocence of Muslims” violates the mostly Catholic country’s religious-freedom guarantees. She gave Google 10 days to block access in Brazil to the film trailer, after which the company will be fined.

Over the weekend, a Pakistani Cabinet minister offered a $100,000 reward to anyone who killed the California-based maker of the film, a Coptic Christian. The government in Pakistan said those were the minister’s own views.

But Mr. Saeed, in his interview with Reuters, which the news agency said was conducted in front of bodyguards, said the U.S. president should have been able to do something about the film.

“Obama has said he cannot block the film,” Mr. Saeed said. “What does that say?”

He also said if the U.S. won’t take action against the filmmakers, “then hand them to us.”