Libyan leader Moammar Gadhafi vowed to fight to the death as he made a rare appearance to bolster his supporters in Tripoli on Friday.

His speech, shown on state television, comes at a crucial time as protesters gain ground, taking over major cities in the troubled country.

"We will continue to fight. We will die here on the dear soil of Libya....," he said. "We can defeat any foreign attempts as we defeated the former Italian imperialism," said Gadhafi, fists pumping in the air as he briefly addressed thousands of supporters in Tripoli's Green Square at about 7 p.m. local time.

Gadhafi, who has blamed international terrorism and al-Qaeda for brainwashing youth, also implored young people in Libya to live a life "with dignity and high morals," as he blew kisses to the crowd.

Meanwhile, militias loyal to Gadhafi opened fire on anti-government demonstrators as they streamed out of mosques in the capital on Friday, witnesses said, reporting at least four killed.

Protesters chanting for Gadhafi's ouster streamed out of mosques near downtown Green Square and other districts after prayers, and they were confronted by troops and militiamen who opened fire, said several witnesses.

One witness reported seeing three protesters killed in the Souq al-Jomaa area near the square, and another reported a fourth death in another district, Fashloum. The reports could not be immediately confirmed.


"There are all kinds of bullets," said one protester near the Souq al-Jomaa, screaming in a telephone call to The Associated Press, with the rattle of shots audible in the background.

Residents hiding in their homes also reported the sound of gunfire in other parts of the capital.

The United States, which has temporarily pulled its diplomats and closed its embassy in Tripoli, said it's not taking any options off the table with regard to its response to the violence in Libya, including potential U.S. military action, White House spokesman Jay Carney said Friday.

UN Secretary General Ban Ki-moon urged the Security Council on Friday to act quickly on a proposed package of UN sanctions aimed at forcing Libyan leaders to end their violent crackdown in the country, Reuters reported.

"It is time for the Security Council to consider concrete action," Ban told the 15-nation council. "The hours and the days ahead will be decisive for Libyans."

The call for regime opponents to march from mosques after prayers was the first attempt to hold a major anti-Gadhafi rally in the capital since militiamen launched a bloody crackdown on marchers early in the week that left dozens dead. SMS messages were sent around urging, "Let us make this Friday the Friday of liberation," residents said.

The residents and witnesses all spoke on condition of anonymity for fear of retaliation.

Gadhafi supporters defend capital

Gadhafi loyalists have clamped down hard in Tripoli, the centre of the eroding territory that the Libyan leader's regime still controls.

As gunfire raged downtown, gunmen opened fire on another march by thousands in Tajoura, a crowded impoverished district on the eastern side of the capital, a participant said. The crowd was moving down a main avenue toward Green Square when a hail of bullets hit, he said.

Trouble in Tripoli

A Libyan-Canadian man told CBC News that Friday's protests in Tripoli started out peacefully.

"It started very peaceful, people started walking towards Green Square ... calling for change" said the Ottawa area man who has been in Tripoli for three weeks, and requested his name not be used for fear of his safety.

He said two big trucks and a group of small cars carrying militia appeared in the area and started firing at people.

"Now, from time to time, you might hear the shooting, it's still there."

"Many, many people have been killed here in Tripoli," he said, noting that the conditions in the North African country have been changing "very, very quickly."

He said he was reluctant to leave the country because his mother was sick and he wanted to stay to help his sisters tend to her.

"I can't leave them in such a circumstance," he said.

"We can't see where it is coming from," he said. "They don't want to stop." He said one man next to him was shot in the neck.

Tripoli, home to nearly a third of Libya's six million people, is the centre of the territory that remains under Gadhafi's control after the uprising swept over nearly the entire eastern half of the country, breaking cities there out of his regime's hold.

There were rallies held across rebellious cities in the east. Tens of thousands held a rally in support of the Tripoli protesters in the main square of Libya's second-largest city, Benghazi, where the revolt began and which is now part of the opposition-held territory in the east.

"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."

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." None of the numbers have been verified.

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 United Nations' 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.

With files from CBC News