Libyan government officials said late Friday that they would stop the fighting in the besieged port city of Misurata because of NATO airstrikes, several hours before NATO bombs struck an apparent military bunker in the capital, Tripoli.

“The tactic of the army is to have a surgical solution, but with the airstrikes it doesn’t work,” Deputy Foreign Minister Khaled Kaim told reporters in Tripoli.

Kaim said the tribes in towns surrounding Misurata, known to support Libyan leader Moammar Gaddafi, were preparing to take over the fight for the rebel-controlled city, which Gaddafi’s forces have been pounding for weeks with rocket, mortar and sniper fire and cluster bombs.

“You will see how they will be swift and quick and fast, and the Libyan army will be out of this situation in Misurata, because the Libyan people around Misurata cannot sustain it like this,” Kaim said.

He said the local tribes had given the army an ultimatum: “If you can’t do it, we will do it.”

The announcement came as Misurata witnessed what opposition spokesman Mohammed Ali said appeared to be its first Predator drone attack at the vegetable market on Tripoli Street, the main three-mile avenue that divides the city, where a few of Gaddafi’s troops are still holed up and attacking.

“We are winning. All of [Gaddafi’s] tanks and weapons have been seized inside Misurata,” he said.

At least 400 people have been killed in the city during the siege, according to doctors, and more than 1,000 are presumed dead.

Rebels in Misurata said the government’s announcement seemed intended to mask the “collapse” of Gaddafi’s forces in the key western city, 131 miles east of Tripoli.

“Gaddafi’s forces are not retreating,” Ali said. “They know they have failed. They’re witnessing the collapse of their forces. I think [Gaddafi] is trying to disguise his loss.”

Shelling of Misurata continued Saturday from government forces stationed south and southwest of the city.

In Tripoli, a NATO airstrike hit what appeared to be an underground military bunker early Saturday morning. Libyan officials who took reporters to the site near Gaddafi’s compound said it was a civilian parking lot with an underground water system.

Residents of Misurata ventured downtown for the first time in weeks Friday as rebels celebrated regaining control of the city center and said they hoped the deployment of U.S.-armed Predator drones could help them drive Gaddafi’s forces out completely.

In the rebel stronghold of Benghazi, far to the east, Sen. John McCain (R-Ariz.), one of the strongest congressional proponents of military intervention against Gaddafi, made an unannounced visit and called for further U.S. and international assistance to the rebels, whom he described as his heroes.

Rebels appeared buoyed by the signs of progress in their military struggle against Gaddafi: As well as reclaiming the center of Misurata, they seized control Thursday of a border crossing with Tunisia near the country’s western mountains.

Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, said Friday that coalition airstrikes had degraded Gaddafi’s ground forces by 30 to 40 percent, and he predicted further weakening. Although he acknowledged that the conflict was at a stalemate, especially in the east, he expressed optimism about the long-term prospects.

“The president has been very clear: The long-term goal here is Gaddafi gone, from the office and from the country, along with his sons,” Mullen told U.S. troops in Baghdad. “The exact outcome of when something is going to happen is very hard to predict, but I think the eventual outcome, that is certain.”

In Misurata, the mood has lifted after weeks of increasingly desperate and sometimes angry calls for more international help.

Gaddafi loyalist forces fled their positions in the highest building on Tripoli Street on Thursday morning under the cover of darkness and heavy rocket and mortar fire. The red-black-and-green rebel flag now flies from the scarred and scorched insurance building that overlooks the city, and rebel soldiers control most of Tripoli Street.

“They left. But it’s still dangerous,” said Muad Ben-Sassi, a Libyan American orthopedic surgeon-turned-combat doctor who treats members of his rebel unit of about 120 fighters in the heart of the city. “I think we’re winning.”

In a news conference in Benghazi after meeting with rebel leaders, McCain urged the Obama administration to formally recognize the rebel Transitional National Council as the country’s legitimate government and called on NATO to intensify its air campaign, especially in Misurata. He said the rebels need close air support from U.S. planes such as AC-130 gunships and applauded this week’s decision to use Predator drones.

McCain and Mullen both discounted Gaddafi’s claims — echoed in the complaints of some congressional critics of the U.S. intervention — that the rebels have been infiltrated by al-Qaeda.

“I have met these brave fighters, and they are not al-Qaeda,” McCain said, after visiting rebels wounded in the Misurata fighting. “To the contrary, they are patriots who want to liberate their nation. We should help them do it.”

The Obama administration gave no sign Friday that it was preparing to act on McCain’s call to grant diplomatic recognition to the rebels. White House spokesman Jay Carney said officials were in contact with multiple Libyan groups, including the Transitional National Council, but had not taken the legally significant step of recognizing a new Libyan head of state.

“We think it’s for the people of Libya to decide who the head of their country is, not for the United States to do that,” Carney said.

Carney said the Arizona senator was not carrying any specific messages or instructions on behalf of the White House.

Misurata’s Tripoli Street has been the scene of some of the most intense battles since the start of the uprising against Gaddafi, who has ruled Libya for nearly 42 years. Gaddafi’s forces took up positions in high buildings all along the street, using snipers to kill scores of civilians.

By nightfall Friday, Gaddafi forces remained in just four buildings on Tripoli Street in and around the main hospital, where they were surrounded by rebels and cut off from the main loyalist force controlling the city’s south.

The street, once a lively area of shops, government buildings, offices and restaurants, is a shell of its former self, with buildings reduced to rubble, walls scarred by bullets and burned-out tanks in the middle of the road.

Residents wandered into the city center free from the threat of sniper fire for the first time in weeks, and videos released by the rebels showed fighters celebrating in streets strewed with glass and rubble, shouting, “Allahu akbar!” (God is greatest.)

The city was now “sniper-free,” the rebels said, as some wept with joy.

“With every victory, I am closer to my wedding,” Ben-Sassi said. “The downtown is the most important. It’s the heart of the city.” The doctor said he was supposed to get married to his fiancee, Amal, on March 29. Instead, he has been treating wounded fighters in some of the most dangerous parts of the city, while she cuts gauze at home for bandages.

Mohamed, a rebel spokesman who asked that his family name be withheld for safety reasons, said Gaddafi’s forces seemed to be in disarray in the city, Libya’s third-largest and the last remaining rebel stronghold on the western coast.

“There is a general pattern of collapse everywhere,” he said, speaking via Skype about Gaddafi’s troops. “According to our fighters, they seem to be acting like headless chickens, because their command and control has been disrupted by NATO.”

The government claimed that its military regained control of the Tunisian border post Thursday hours after the rebels captured it, but a photographer from the Associated Press said several rebel flags were still flying at the border Friday, with heavily armed rebels in command.

On Thursday, the United States took a step toward further involvement in the conflict, flying armed Predator drones over Libya for the first time.

The drones were forced to turn back Thursday because of bad weather, and the weather there was bad again Friday. Officials said the U.S. military would maintain at least two of the unmanned aircraft over Libya at all times.

Denyer reported from Tripoli. Correspondent Aaron Davis in Baghdad and staff writers William Branigin and Joby Warrick in Washington contributed to this report.