The resolution on Thursday - co-sponsored by the United States, France and Britain - urges the independent commission to complete its work in three months but gives Secretary-General Kofi Annan authority to extend its mandate for an additional three months if necessary.
The resolution follows last month's UN report by a fact-finding team which concluded that a Lebanese investigation did not meet international standards.
The team, led by deputy Irish police commissioner Peter Fitzgerald, called for an entirely new investigation by an outside team.
"It is very important that the facts of this tragic event are known and we are pleased the council has adopted this resolution," US Deputy Ambassador Stuart Holliday said.
The US envoy added: "We have a commitment from the government of Lebanon to cooperate with the commission. We would be very surprised if they didn't honour their commitment."
The resolution was approved by a
15-0 vote in the Security Council
France's UN ambassador, Jean-Marc de La Sabliere, agreed, saying: "There will be cooperation and I'm confident that the commission will be able to do the job."
The UN resolution, approved by a 15-0 vote, welcomes Lebanon's approval of the independent inquiry, but the council rejected amendments proposed by the government that would have given it a major role in the inquiry.
It authorises an international independent commission to assist Lebanese authorities in their investigation "of all aspects of this terrorist act", but it leaves the commission to decide what role Lebanese authorities would play.
It says Lebanese authorities should give the investigators access to all documents and evidence in their possession.
The resolution also gives the commission authority to collect any additional information and evidence, visit any relevant sites, and "interview all officials and other persons in Lebanon that the commission deems relevant to the inquiry".
Council members, however, were reluctant to say whether this meant the investigators could have access, for example, to the presidential palace or to interview Lebanese President Emile Lahud.
"I think the important thing for this resolution is that ... this commission has to cooperate and work within the framework of Lebanese laws and their legal systems"
China's UN Ambassador
The council asked Annan to move quickly to establish the commission, including consulting "urgently" with the Lebanese government.
Russia, China and Algeria wanted to make sure that the resolution reaffirmed Lebanon's sovereignty while giving the inquiry enough independence to be effective.
"I think the important thing for this resolution is that ... this commission has to cooperate and work within the framework of Lebanese laws and their legal systems," China's UN Ambassador Wang Guangya, the current council president, said.
The size of the commission has not been determined, though the authors of the Fitzgerald report had recommended a group of 50, acting US Ambassador Anne Patterson said on Wednesday.
Al-Hariri's 14 February killing has
thrown the country into turmoil
"It's not going to be small," she said, adding the mission would include experts focused solely on explosives, forensics or other highly technical fields.
Ensuring its security would also be a major factor.
Al-Hariri's 14 February killing in a bombing caused an uproar in Lebanon, sparking massive anti-Syrian street protests.
The Lebanese opposition claimed Syria and Lebanon's pro-Syrian government orchestrated the killing. Syria denies any involvement.