GENEVA — Overriding fierce objections from Sri Lanka, the United Nations Human Rights Council voted on Thursday to open an international investigation into possible war crimes by both the Sri Lankan government and the Tamil Tiger rebels in the final stages of a 26-year civil war that ended in 2009.

The council’s 47 members voted 23 to 12 with 12 abstentions in favor of a resolution sponsored by a core group of nations, including the United States, that calls on the Office of the High Commissioner for Human Rights to conduct a comprehensive investigation into allegations of serious violations and abuses of human rights by both sides.

The high commissioner, Navi Pillay, had urged the creation of an independent inquiry on the grounds that the Sri Lankan authorities had made little progress in investigating possible war crimes during the military operations that crushed the Tamil Tigers’ brutal rebellion to establish a homeland five years ago.

That lack of progress, Ms. Pillay added pointedly in a report to the council in February, is “fundamentally a question of political will.” Sri Lankan investigations of the military’s actions lack independence and credibility, she added.