Libya’s new civilian leaders put all military commanders in the capital under their control Saturday, a move designed to rein in Islamist influence and paper over internal tensions.

Libya’s rebellion has been plagued from its outset by reports that its civilian leaders had little control over military commanders and by talk of rivalry among commanders. Western officials acknowledge that there are also concerns about the influence of Islamists who fought against Soviet rule in Afghanistan in the 1980s and whose experience gave them an important role in the armed uprising against Moammar Gaddafi.

On Saturday, the transitional governing council moved to quell that talk by bringing the military commanders in Tripoli under one umbrella, creating a Supreme Security Committee headed by Deputy Prime Minister Ali Tarhouni.

Meanwhile, officials said there were unconfirmed reports that Gaddafi’s forces had retreated from the city of Bani Walid, 100 miles southeast of Tripoli, where three of his sons were believed to have taken refuge.

Tripoli military commander Abdulhakim Belhadj said that Gaddafi’s forces had vanished from checkpoints they were manning outside Bani Walid and that the city was reported to be 90 percent under the control of rebel sympathizers.

The Associated Press reported late Saturday that thousands of rebel fighters were closing in on the town from three sides. “If they don’t raise the rebel flag tomorrow, we will enter with force,” Abdel-Razak al-Nathori, a rebel brigade commander, told the AP.

Rebel commanders said they believe that the three Gaddafi sons had escaped and headed to the south across the Sahara, possibly toward the city of Sabha. A fourth son, military commander Khamis Gaddafi, was killed in an ambush on the road to Bani Walid a week ago, they said. Gaddafi’s whereabouts remained unknown.

In Tripoli, the new 21-member security committee includes representatives of many of the fighters who helped liberate Tripoli, including some from Misurata and the Nafusa Mountains, as well as representatives from the defense and interior ministries.

Tarhouni said the committee would be responsible for security in the capital until a police force was up and running.

But Mohammed Benrasali, a senior official in the Libya Stabilization Committee and a member of the Misurata city council, said the move was largely designed to rein in Belhadj, whose past as a fighter in Afghanistan was seen as something of a public relations problem for a government seeking substantial Western backing.

Belhadj is a former head of the Libyan Islamic Fighting Group, which engaged in an insurgency against Gaddafi in the 1990s. Belhadj was appointed head of the Tripoli Military Committee earlier in the week, but he irritated many people by appearing to claim too much credit for the city’s liberation.

”Mr. Belhadj is getting too big for his shoes,” Benrasali said. “We needed someone to rein him in.”

Tarhouni, a former economics lecturer at the University of Washington in Seattle, is already the rebel council’s finance and oil minister, and is considered a better person to represent the council in the West. Officials said they had to persuade him to take on another role.

Other tensions simmered within the rebel ranks. In particular, the people of Misurata, whose liberation in April played a huge role in showing that Gaddafi’s army could be defeated, have complained that they are being overlooked in the competition for plum jobs.

Last week, hundreds of people demonstrated in Misurata about the influence of former members of the Gaddafi government in the new administration, including former ambassador to the United Nations Abdurrahman Mohamed Shalgham.

“We think Mr. Shalgham should be put in the freezer for now until he clears himself,” Benrasali said.

The leaders of the Transitional National Council, Mustafa Abdel Jalil and Mahmoud Jibril, are expected to arrive in Tripoli next week and to announce soon an interim government to lead the country until the election in eight months’ time of an assembly to write a new constitution.

It will be an important test of the new government’s inclusiveness. Officials say that they are making progress every day in sorting out the problems left by 42 years of autocratic rule and that tensions within their ranks should not be overplayed.

In the streets of Tripoli, people say they are waiting patiently for the leaders’ arrival, but some warn that their new leaders need to show that they can handle the capital’s many problems, including a chronic shortage of water and gasoline.

“You can’t run a country by making telephone calls,” said Amjid Msalati, 31, a dentist. “People are happy now, but if they don’t solve the problems of food, water and gas, in a week or two, there will be tension.”