The United Nations Security Council has expressed "concern" over the fate of the massive weapons stockpile built up in Libya under Colonel Muammar Gaddafi.
The council called on Libya and its neighbours to stamp out the proliferation of looted arms.
It was worried they could fall into the hands of al-Qaeda and other militant groups.
Many weapons were destroyed in Nato operations, which ended at midnight on Monday.
However, officials said it was not clear how many were still in circulation.
The resolution, drafted by Russia and adopted unanimously, said that a huge stockpile of shoulder-fired missiles, which had been accumulated by Col Gaddafi, could still pose a threat to passenger aircraft.
It emphasised that the "proliferation of all arms... in particular, man-portable surface-to-air missiles, in the region, could fuel terrorist activities, including those of al-Qaida in the Islamic Maghreb".
The resolution also called on the new Libyan government to destroy chemical weapons in co-ordination with international authorities.
The vote came as Nato formally ended its seven-month air campaign. The mission formally came to an end at one minute to midnight Libyan time (21:59 GMT) on Monday.
Operations began under a UN Security Council mandate to protect civilians on the evening of 19 March, as Col Gaddafi's forces moved to crush the uprising in the eastern rebel-held city of Benghazi.
Overall, Nato aircraft flew more than 26,000 sorties, including nearly 10,000 strike missions. More than 1,000 tanks, vehicles and guns were destroyed, along with Col Gaddafi's command and control network.
Nato chief Anders Fogh Rasmussen - in Tripoli to mark the end of the mission - said Nato's military forces had prevented a massacre and saved countless lives.
He said Nato could help Libya's new rulers with security and the transition to democracy if requested.
Mr Rasmussen had talks with National Transitional Council (NTC) leaders about Libya's future and the roadmap for transition to democracy.
"You've acted to change your history and your destiny; we acted to protect you. Together we succeeded," he said at a news conference.
"The future of free Libya is finally firmly in your hands."
NTC chairman Mustafa Abdul Jalil expressed Libya's gratitude for the help received from Nato forces and other foreign forces, as well as the Libyan rebel forces.
'Pose a threat'
The UN resolution on preventing the proliferation of looted arms was drafted by Russia amid mounting fears they could fall into the hands of militants, including groups connected to al-Qaeda.
It expresses particular concern about Col Gaddafi's vast stockpile of shoulder-fired surface-to-air missiles.
Many are old Soviet-style rockets, but they could still pose a threat to passenger aircraft. The resolution calls on Libya's government to take all necessary steps to stop the proliferation of arms, and says neighbouring states should draw up measures to prevent smuggling.
Many - but not all - of Col Gaddafi's weapons and storage facilities were destroyed by Nato air strikes, and there is no clear idea of how many may be now be in circulation, our correspondent adds.
Last week, the Security Council heard that international inspectors were working to identify storage areas, but that hundreds of suspected sites still needed to be visited.
Fifteen US explosives experts are on the ground, with numbers expected to rise to 100.
Coinciding with the official end of the Nato air campaign, the transitional authorities named a new prime minister - Tripoli academic Abdurrahim al-Keib.
This comes days after the NTC declared Libya "liberated" following Col Gaddafi's death.
The NTC wants a national congress to be elected within eight months, and for multi-party elections to be held in 2013.
Mr Keib, an academic specialising in electrical engineering and based in Tripoli, beat eight other candidates to receive 26 of the 51 votes from members of the NTC.
The BBC's Katya Adler in Tripoli say Mr Keib is seen as a consensus candidate and Libyans will be hoping he can help smooth out regional and other rivalries within the NTC.