David Cameron has become the first foreign leader to visit northern Sri Lanka since 1948, where he met leaders of the Tamil minority in the country.
The Tamils’ treatment at the end of the country’s civil war dominated the run-up to the Commonwealth summit, which opened in the capital Colombo earlier.
The UK prime minister has defied calls for him to boycott the event in protest against alleged human rights abuses.
The BBC’s Nick Robinson said he had been greeted by rival protestors.
Mr Cameron has insisted there should be a proper investigation into alleged Sri Lankan war crimes in the final months of the conflict which ended in 2009.
In a highly symbolic move, Mr Cameron travelled to the Tamil-dominated north of the country – the first international leader to do so since Sri Lankan independence.
He toured a library in Jaffna – which was repeatedly attacked and rebuilt during the conflict – and met the new chief minister of the northern province – former judge CV Vigneswaran, of the Tamil National Alliance.
The Commonwealth summit has opened amid calls for David Cameron to press President Mahinda Rajapaksa over human rights
The BBC’s political editor, who is travelling with Mr Cameron, said the prime minister had been greeted by a group of mainly women who claim their relatives disappeared during the conflict and who were "absolutely desperate" to press pictures of their loved ones and petitions into the hands of British officials.
Although several protestors had been thrown to the floor by police, he said it was a peaceful demonstration and the prime minister had been made "fully aware of their grievances and their grief".
There was also a rival demonstration by pro-government supporters calling for an investigation into alleged abuses during the period of British rule prior to 1948.
Before returning to Colombo, he also visit the offices of the Uthayan newspaper, whose presses were burned down earlier this year and whose journalists have been routinely attacked.
He praised the journalists’ "bravery" for working in such intimidating conditions.
The Sri Lankan government has reacted angrily to suggestions the prime minister will press President Mahinda Rajapaksa over human rights during the three-day Commonwealth Heads of Government Meeting (Chogm).
One minister said earlier this week he had no right to raise the issue.
But campaigners have urged the PM to keep the focus on human rights and the bloody conclusion to the civil war, in which UN estimates some 40,000 people were killed.
President Rajapaksa rejects accusations of rape, executions and indiscriminate shelling, but told journalists on Thursday: "People were getting killed for 30 years, at least after 2009 we have stopped it."
The prime ministers of Canada, India and Mauritius are staying away from the summit in protest over the allegations.
But the UK administration argues it is better to be there to highlight the issue and put pressure on the Sri Lankans.
David Mepham, UK director of campaign group Human Rights Watch, told BBC Radio 4’s Today programme: "One of the crucial things he needs to do is press for some sort of international inquiry into what happened in 2009.
Prime Minister David Cameron was welcomed by traditional Sri Lankan dancers in Colombo
The Prince of Wales declared the summit of world leaders open
"The Sri Lankans have got their own domestic process, but frankly it’s fatally flawed and it’s not going to deliver any real justice to the people who were killed. There needs to be an international mechanism.
"The other thing, which is equally important, is that there needs to be real pressure on the ongoing human rights issues. This isn’t just a problem of the past."
The Labour Party said Mr Cameron should join other leaders in avoiding the event.
But the prime minister dismissed the calls as "rank hypocrisy", pointing out it was his predecessor Gordon Brown who originally agreed the summit venue in 2009.
Mr Cameron told the BBC that Labour was "playing politics" and criticised its "absolutely extraordinary behaviour".
Speaking from the summit, Foreign Secretary William Hague told Today: "There’s a great deal of evidence about war crimes, and that is why we have called for an independent, thorough, credible investigation.
"There should be an investigation – if there isn’t, then we will be in favour of an international investigation.
"But it’s also important to be able to work with people in this country of all persuasions and backgrounds. We do that with people from all walks of life in Sri Lanka and they welcome that."
The Prince of Wales, who celebrated his 65th birthday on Thursday, is representing the Queen at the biennial event which he opened earlier.
Prince Charles told the summit: "Each one of us is here because of the hope and trust we place in the Commonwealth to bring that ‘touch of healing’ to our troubles and deliver the very best future for our people."