WASHINGTON — The Libyan government in recent weeks tacitly approved two American commando operations in its country, according to senior American officials, one to capture a senior militant from Al Qaeda and another to seize a militia leader suspected of carrying out the Sept. 11, 2012, attacks on the United States diplomatic mission in Benghazi.

The Qaeda leader, Nazih Abdul-Hamed al-Ruqai, was captured by American commandos in Tripoli on Saturday in a raid that the United States had hoped to keep secret, but that leaked out to the news media. The operation has been widely denounced by Libyan officials, who have called it a kidnapping and said they had played no role in it.

While American officials expected that the Libyan government would claim that it had known nothing about the operation, news of the raid has raised concerns that the suspect in the Benghazi attacks, Ahmed Abu Khattala, has now been tipped off that the United States has the ability to conduct an operation in Libya.

It is not clear why American military commanders did not conduct both operations simultaneously to avoid this problem. Some military commanders said conditions in Libya on Saturday may not have been opportune. But the backlash against a second raid could bring down the government of Prime Minister Ali Zeidan, which has teetered on the brink of collapse and has little control over vast parts of the country, particularly in the eastern part near Benghazi.