The 15-member Council unanimously adopted the resolution under Chapter Seven of the UN Charter, which is invoked in cases of threats to international peace and security.
Resolution 1838 "calls upon all states interested in the security of maritime activities to take part actively in the fight against piracy on the high seas off the coast of Somalia, in particular by deploying naval vessels and military aircraft."
The French-drafted text urges states with naval vessels and military aircraft operating on the high seas and airspace off the Somali coast "to use the necessary means, in conformity with international law ... for the repression of acts of piracy."
It again "condemns and deplores all acts of piracy and armed robbery at sea against vessels off the coast of Somalia."
France's UN Ambassador Jean-Maurice Ripert immediately welcomed the unanimous adoption of the text, saying it sends "a clear signal to the pirates."
"It states very clearly that you can use force against the pirates," he added, pointing out that European Union nations were preparing to launch an anti-piracy security operation off Somalia before the end of the year.
"This shows the great importance attached by the international community to the severity and urgency of the piracy situation," said Chinese Ambassador Zhang Yesui, who chairs the council this month.
He told reporters that the adoption also "shows the determination of the international community to strengthen cooperation in the fight against piracy."
"At the same time (council) members expressed the view that the piracy issue did not stand alone," he added. "Peace and security in general would have to be addressed."
His South African counterpart Dumisani Kumalo urged the council not to lose sight of the bigger picture in Somalia, referring to the unresolved civil war.
"The issue in Somalia is the conflict. Until you address the issue inside Somalia you will always have piracy," he told reporters.
Aid groups have scaled down operations inside Somalia because of growing insecurity largely blamed on Islamist militants who have waged a guerrilla war since they were ousted last year in a joint Somali-Ethiopian offensive.
Indonesian Ambassador Marty Natalegawa also noted that "the provisions in this resolution apply only with respect to the situation in Somalia and shall not affect the rights or obligations or responsibilities of member states under international law."
Last June, the 15-member Council had already adopted a resolution empowering states to send warships into Somalia's territorial waters with the government's consent to combat piracy and armed robbery at sea.
The June resolution had given a six-month mandate to states cooperating with Somalia's transitional government (TFG) in fighting piracy to "enter the territorial waters of Somalia for the purposes of repressing acts of piracy and armed robbery at sea."
The waters off Somalia -- which has not had an effective central government for more than 17 years and is plagued by insecurity -- are considered to be among the most dangerous in the world.
Dozens of ships, mainly merchant vessels, have been seized by pirates off Somalia's 3,700 kilometres (2,300 miles) of largely unpatrolled coastline.
The pirates operate high-powered speedboats and are heavily armed, sometimes holding ships for weeks until they are released for large ransoms paid by governments or owners.
Tuesday, pirates holding a Ukrainian ship carrying tanks and military hardware with 21-member crew off the coast of Somalia said that a deal could be reached on Wednesday for the vessel's release.
"A deal might be sealed by Wednesday and then we will issue a statement regarding the end of the matter," said Sugule Ali, a spokesman for the estimated 50 pirates holding the MV Faina since September 25.
The pirate would not comment on the amount of ransom being negotiated.