BENGHAZI, Libya — Thousands of Libyans demanding Moammar Gadhafi's ouster rallied to show solidarity with the besieged capital, while the government moved to tighten its grip on Tripoli following opposition gains elsewhere in the country.

Tanks and checkpoints lined the road leading to Tripoli's airport, and security cordons went up around mosques where protesters might gather. Young armed men, some wearing green bands on their arms in a sign of loyalty to Gadhafi, checked vehicles for weapons.

Foreign mercenaries and Libyan militiamen loyal to Gadhafi have fought fiercely to roll back the uprising against his rule, attacking two nearby cities Thursday in battles that killed at least 17 people. But rebels made new gains, seizing a military air base, as Gadhafi blamed Osama bin Laden for the upheaval.

A Tripoli resident said people in the capital have received messages on their cell phones urging them to launch demonstrations after Friday prayers, and he said he expected thousands to comply despite fear of pro-Gadhafi militiamen who have been deployed on the streets.

The capital's central Green Square was the site of intense clashes earlier in the week between government supporters and protesters.

The resident said the government detained several activists in Tripoli late Thursday to try to prevent the demonstrations from taking place. Among those detained was Mukhtar al-Mahmoudi, a former member of Libya's Muslim Brotherhood, who in the past spent six years in jail, the resident said, speaking on condition of anonymity for fear of reprisals.

"Let us make this Friday the Friday of liberation," one of the messages read, according to the resident.

Gadhafi's crackdown — the harshest by any Arab leader in the wave of protests that has swept the Middle East the past month — has so far helped him maintain control of Tripoli, home to about a third of Libya's 6 million population. But the uprising has divided the country and raised the specter of civil war.

Signaling continued defiance, Gadhafi's son Seif al-Islam, vowed his family will "live and die in Libya," according an excerpt from an interview to be aired later Friday on CNNTurk. Asked about alternatives in the face of growing unrest, Gadhafi said "Plan A is to live and die in Libya, Plan B is to live and die in Libya, Plan C is to live and die in Libya.

The New York-based Human Rights Watch has put the death toll in Libya at nearly 300, according to a partial count. Italy's Foreign Minister Franco Frattini said estimates of some 1,000 people killed were "credible."

Residents in Tripoli have largely been holed up at home for days amid fear of pro-Gadhafi militiamen — a mix of Libyans and foreign mercenaries — and it was unclear how many would respond to the call.

But witnesses in cities under rebel control said they expected mass demonstrations in a show of solidarity.

Tens of thousands gathered outside a courthouse for prayer services in the eastern city of Benghazi, the coastal city where the uprising began on Feb. 15. Tents — some with photographs of people who had been killed in fighting — were set up on the square and protesters served breakfast to people, many carrying signs in Arabic and Italian.

"We will not stop this rally until Tripoli is the capital again," said Omar Moussa, a demonstrator. "Libyans are all united ... Tripoli is our capital. Tripoli is in our hearts."

A few tanks that were parked on the beach were covered with people.

Muslim cleric Sameh Jaber, wearing the traditional Libyan white robe and a red cap, told worshippers that Libyans "have revolted against injustice" and called for revenge against Gadhafi "because of what he did to the Libyan people."

International momentum also has been building for action to punish Gadhafi's regime for the bloodshed.

The European Union's foreign policy chief, Catherine Ashton, said Friday that the bloc needs to consider sanctions such as travel restrictions and an asset freeze against Libya to achieve a halt to the violence there and move toward democracy.

NATO's main decision-making body also planned to meet in emergency session Friday to consider the deteriorating situation, although Secretary-General Anders Fogh Rasmussen has said the alliance has no intention of intervening in the North African nation.

The U.N.'s top human rights official, Navi Pillay, meanwhile, said reports of mass killings of thousands in Libya should spur the international community to "step in vigorously" to end the crackdown against anti-government protesters.

Most of the eastern half of Libya has already broken away, and diplomats, ministers and even a high-ranking cousin who was one of his closest aides — Ahmed Gadhaf al-Dam — have abandoned Gadhafi, who has ruled Libya for more than four decades.

The rebels now control a swath of territory from the Egyptian border in the east, across nearly half Libya's 1,000-mile (1,600-kilometer) Mediterranean coast to the key oil port of Breqa, about 440 miles (710 kilometers) east of Tripoli.

Gadhafi is believed to be firmly in control only of the capital, some towns around it, the far desert south and parts of Libya's sparsely populated center.

A witness said police had disappeared from the streets and a committee had been formed to run things in Misrata, where pro-Gadhafi militiamen — a mix of Libyans and foreign mercenaries — battled with government opponents who had been guarding an airport outside the city.

"Now it is calm, but there are worries that the government is preparing lots of security forces and that there will be a massacre today," he said. "We are spread out all over the city and the youths are in control."

The witness, who like other residents and officials spoke on condition of anonymity for fear of reprisals, said a protest was planned later Friday in Misrata, Libya's third-largest city about 120 miles (200 kilometers) from the capital. He said a small group of youths might be dispatched to Tripoli after the opposition movement called for protesters to march on the capital, but the others had to stay behind to protect their city amid rumors the regime planned to attack again.

A doctor at Misrata's central hospital raised the death toll from Thursday's fighting to 20 protesters and one pro-government militiaman. He also said at least 20 people were wounded.

The opposition was in control of the city and thousands massed in the central square after prayers in support of protesters in Tripoli, according to the doctor and a witness.

The worst bloodshed Thursday was in Zawiya, 30 miles (50 kilometers) west of the capital Tripoli. An army unit loyal to Gadhafi opened fire with automatic weapons on a mosque where residents — some armed with hunting rifles for protection — have been holding a sit-in to support protesters in the capital, a witness said.

The troops blasted the mosque's minaret with an anti-aircraft gun. A doctor at a field clinic set up at the mosque said he saw the bodies of 10 dead, shot in the head and chest, as well as around 150 wounded. A Libyan news website, Qureyna, put the death toll at 23 and said many of the wounded could not reach hospitals because of shooting by "security forces and mercenaries."

Zawiya, a key city close to an oil port and refineries, is the nearest population center to Tripoli to fall into the hands of the anti-Gadhafi rebellion that began Feb. 15. Hundreds have died in the unrest.

The upheaval in the OPEC nation has taken most of Libya's oil production of 1.6 million barrels a day off the market. Oil prices hovered above $98 a barrel Friday in Asia, backing away from a spike to $103 the day before amid signs the crisis in Libya may have cut crude supplies less that previously estimated.

Associated Press writer Ben Hubbard contributed to this report.