Media playback is unsupported on your device Media caption The BBC's Nick Robinson was with the prime minister as his convoy was mobbed

David Cameron has clashed with the president of Sri Lanka as he pushed for action to protect the rights of its minority Tamil community.

Downing Street said the PM "pressed his points very directly and robustly" in an hour-long meeting with Mahinda Rajapaksa at a Commonwealth summit.

Mr Cameron's convoy was earlier mobbed by demonstrators on a visit to the north of the country.

Mr Rajapaksa says he has brought peace and stability to Sri Lanka.

The Tamils' treatment at the end of the country's civil war in 2009 has dominated the run-up to the the Commonwealth Heads of Government Meeting (Chogm), taking place in the capital Colombo.

Mr Cameron has insisted there should be a proper investigation into alleged Sri Lankan war crimes in the final months of the conflict, saying a process of "truth-telling" was essential for reconciliation.

In a historic move, Mr Cameron travelled to the Tamil-dominated north of the country - the first international leader to do so since Sri Lankan independence in 1948 - before holding face-to-face talks with the country's president.

At one point, the PM's convoy was surrounded by more than 200 protesters holding pictures of loved ones who they claim were killed by the Sri Lankan armed forces or have disappeared.

Mr Cameron said the visit - in which he also toured a temporary refugee camp and newspaper office whose printing presses have been burnt - had "drawn attention to the plight" of the Tamil minority in the country.

Analysis As Mr Cameron's entourage was leaving the public library, a group of screaming women - desperate to make their representations directly to the first world leader to come here - pressed photographs and petitions into our hands

He said the first-hand accounts he had heard of journalists who have been attacked and of a young woman who had grown up in a refugee camp would "stay with him" for a long time.

Mr Cameron said staging the summit in Sri Lanka had already resulted in positive changes, but the authorities needed to do much more to show they respected human and political rights.

"The fact is about this country that there is a chance of success because the war is over, the terrorism has finished, the fighting is done," he said.

"Now what's needed is generosity and magnanimity from the Sri Lankan government to bring the country together.

"And I think coming here, listening to these people, hearing these arguments, helps to draw attention to their plight. I think the spotlight has been shone on Sri Lanka and people can see the good and the bad."

'Desperate'

The BBC's political editor Nick Robinson, who is travelling with Mr Cameron, said several protestors had been thrown to the floor by police as they tried to approach the prime minister's vehicle with photographs of relatives "disappeared" in the civil war and petitions.

He stressed that the demonstration had not been violent, but the prime minister had been made "fully aware of their grievances and their grief".

Image copyright AP Image caption David Cameron has said the accounts of loss and hardship he heard on his visit to the north of the country will stay with him for a long time

Image copyright Getty Images Image caption Tamil women approach the media bus travelling with David Cameron in Jaffna

The UK prime minister has defied calls for him to boycott the Commonwealth summit in protest against alleged human rights abuses.

Ponniah Manikavasagam, BBC Tamil, Jaffna There was heavy security around the Palaly air base near Jaffna when the aircraft carrying the British delegation landed. David Cameron first went to the famous Jaffna library to meet the main Tamil political party leaders. Hundreds of relatives of those who went missing in the government's war against the Tamil Tiger rebels held a protest rally to attract his attention. Some of them had tied black ribbons over their mouths and some were holding photos of their missing relatives. They were all shouting slogans demanding international investigation into alleged war crimes. When the British delegation was leaving the building, protesters surged forward to get their attention pushing photographs of their missing loved ones and petitions towards the convoy. Police pushed them back; some of the protesting women fell to the ground. Pro-government supporters also held a protest rally outside the library. Mr Cameron has also visited the leading Tamil Daily Uthayan's office, which was torched and several of its reporters killed during the war. Many Tamils in Jaffna have broadly welcomed the visit of Mr Cameron saying it has helped to highlight their issues to the outside world.

President Rajapaksa rejects accusations of rape, executions and indiscriminate shelling, saying the end of the war had brought peace, stability and the chance of greater prosperity to the country.

But campaigners have said an international investigation is needed into the bloody conclusion to the civil war, in which UN estimates some 40,000 people were killed.

"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," David Mepham, UK director of campaign group Human Rights Watch, said.

"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 prime ministers of Canada, India and Mauritius are staying away from the summit in protest over the allegations.

Gordon Campbell, the Canadian High Commissioner to the UK, told the BBC that Sri Lanka had "turned its back on the very principles that the Commonwealth espouses".

Image copyright Getty Images Image caption The PM met chief minister of Northern province, C. V. Vigneswaran (right) and Sri Lankan Tamil National Alliance leader R. Sampanthan

The Labour Party said Mr Cameron's presence was a "reward" for the Sri Lanka president.

"There was a naivety about the British government's approach to this summit," shadow foreign secretary Douglas Alexander said.

"The scale of the suffering has not been challenged in the way it should have been in past months."

The prime minister has dismissed Labour's call for a boycott as "rank hypocrisy", pointing out it was his predecessor Gordon Brown who originally agreed the summit venue in 2009.

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."