Prime Minister Abdurrahim el-Keib has given militias a two-week deadline to either surrender their arms or get out of town, Britain's The Guardian reported.
Gunmen backed by jeeps mounted with anti-aircraft guns searched cars at a checkpoint while side roads were blocked to prevent militiamen from infiltrating the city center.
"The people demand safety provided by legitimate government enforcement bodies, and it is our duty to respond," said Razzak Abuhajar, chairman of Tripoli council.
Many residents have complained that units loyal to the late leader Moammar Gadhafi continue to roam the streets of Tripoli.
On Monday a group of pro-Gadhafi gunmen tried to storm a hospital before being beaten back by government fighters.
Fighting in western Libya has prompted Tunisia to close its border and suspend Tunis Air flights to Tripoli.