Opponents of Libyan leader Muammar Gaddafi prepared to march in the capital after prayers on Friday and they were expecting government forces to respond with a violent crackdown.
"We do not have any weapons. We will go to the mosque and then say Gaddafi should leave," said Mohammed, a resident in the Tripoli district of Tajoura where clashes took place last week. "They (pro-Gaddafi militias) will attack."
A witness said many of the routes into Tajoura were blocked, and soldiers and armoured personnel carriers were stationed around the neighbourhood. There were also men in civilian clothes armed with Kalashnikov rifles, the witness said.
The authorities were preventing foreign media from reporting independently on the protests in Tripoli, Gaddafi's principal remaining stronghold after large swathes of the country rejected his rule in an uprising.
Security guards stood in the way when journalists including Reuters reporters tried to walk out of the gates of the media hotel to travel to neighbourhoods in the capital where anti-Gaddafi protests are anticipated.
Officials later allowed them out of the hotel but only if they boarded buses with government drivers who were taking them to locations selected by the authorities.
A revolt against Gaddafi's four-decade rule has left the eastern side of the country, and several towns elsewhere, in rebel control but he and his entourage had presented an image of normality in the capital.
Several residents of Tripoli have said they are planning to protest against Gaddafi when they leave their mosques after Friday prayers, at about 1300GMT.
Residents said they anticipate a violent crackdown by armed pro-Gaddafi militias, who have been roaming the city in civilian cars and with scarves wrapped around their heads.
Friday is the day of religious observance in the Muslim world when thousands of men assemble in the mosques to pray and listen to sermons. It can also be a flashpoint for outpourings of anger.
Last Friday, several thousand anti-Gaddafi protesters came out into the streets after prayers. Armed security forces broke up the protests, and there were unconfirmed reports from witnesses that protesters were shot dead.
A Libyan government spokesman said journalists' movements were being restricted because their presence could trigger violence from what he described as affiliates of al Qaeda.
"These are exceptional circumstances. I know you're going to talk about it and twist it the way you want," said the spokesman, Mussa Ibrahim.
"We are preparing to pay this price of preventing you guys from reporting to avoid turning Tripoli into Baghdad."
Overnight, gunshots could be heard outside the Rixos hotel, just south of central Tripoli. About 130 journalists are staying in the hotel after being invited to Libya on an officially organised media visit.