GENEVA (Reuters) - Sri Lanka should ensure government troops who committed war crimes during the final stages of its war against Tamil rebels are brought to justice, the U.N. Human Rights Council said on Thursday.

Despite heavy lobbying by a 70-strong team from Colombo, the Geneva-based forum adopted a resolution put forward by the United States urging the Sri Lanka government to implement the recommendations of an official Sri Lankan probe. That commission called for the prosecution of soldiers guilty of misconduct.

Tens of thousands of civilians were killed in 2009 in the final months of Sri Lanka's 25-year civil war, a United Nations panel said last year, as government troops advanced on the ever-shrinking northern tip of the island controlled by Tamil forces fighting for an independent homeland.

The panel said it had credible allegations of serious violations committed by both the government and Liberation Tigers of Tamil Eelam, a group that was classified as a terrorist organization by more than 30 countries.

Sri Lanka's government has consistently denied allegations that it targeted civilians, though it has acknowledged that some were killed as troops advanced north.

Twenty four members of the human rights council backed the resolution, but 15 opposed it, including Cuba, Russia and China, who decried it as an attempt to interfere in Sri Lanka's internal affairs. A further eight countries abstained.

U.S. Ambassador Eileen Chamberlain Donahoe told the council the resolution was "reasonable, constructive, and carefully tailored to the needs of the situation", but Sri Lanka's presidential envoy on human rights said it was counterproductive.

"After 30 long years of instability and violence we have achieved stability and peace. We need to be given time to further consolidate the clear progress that has been achieved in a short period of three years," said Mahinda Samarasinghe who led Colombo's delegation.

Minority Tamils have long complained of persecution by successive governments dominated by the Indian Ocean island's Sinhalese majority since independence from Britain in 1948.

Juliette De Rivero, advocacy director at Human Rights Watch in Geneva, said the vote showed there was broad international dissatisfaction with Sri Lanka's accountability efforts.

"Many countries have recognized that this resolution is an important first step toward serious action to investigate the many abuses by both sides during the conflict," she said in a statement.

Sri Lanka's President Mahinda Rajapaksa, who is a favorite target of the pro-LTTE Tamil diaspora and rights groups, has rejected several oft-repeated accusations including one that as many as 40,000 civilians were killed in the final months.

(Reporting by Stephanie Nebehay and Tom Miles in Geneva; additional reporting by Shihar Aneez in Colombo; Editing by Ben Harding)