DAVID Cameron clashed with the Sri Lankan president after witnessing emotional protests on a dramatic visit to the war-torn north of the island.

The Prime Minister pressed Mahinda Rajapaksa, whose regime is accused of war crimes, "very directly and robustly" during a 60-minute face-to-face meeting, No 10 said.

But the Sri Lankan leader - who denies the allegations surrounding the end of the ­country's civil war - is believed to have pushed back and accused Mr Cameron of seeking votes from the UK's Tamil community.

Earlier Mr Cameron had become the first foreign leader for more than 60 years to visit the Tamil-dominated region in the north of the country.

There hundreds of ­demonstrators, some holding up photographs of missing loved ones, thronged the Prime Minister's motorcade. The Conservative leader also spoke to men, women and children who have spent more than 20 years in a "temporary" camp.

He visited a newspaper office where he met journalists whose colleagues had been persecuted and killed and viewed bullet holes in the walls from attacks.

Mr Cameron said the powerful scenes he had witnessed had ­reinforced his commitment to seek a full inquiry into the alleged war crimes.

However, Labour hit out at the Prime Minister accusing him of "rewarding" the Sri Lankan regime through his visit.

A number of leaders of other countries, including Canada and Mauritius, had stayed away, boycotting this weekend's Commonwealth Heads of Government meeting because of the accusations.

The allegations centre on the way the regime brought the civil war to an end in 2009. Up to 40,000 civilians are estimated to have died in the final months of the decades-long fight between the regime and the Tamil Tiger separatists.

Speaking publicly, Mr Cameron said Mr Rajapaksa should show generosity towards the Tamils and act to secure a peaceful co-existence, as he urged the Sri Lankan government to win the peace as well as the war.

"Seeing pictures of journalists, shot and killed, on the walls and hearing stories of journalists who have disappeared long after the war has ended, that will stay with me," he said. "And also the image, in this camp, of talking to a young woman who came here when she was very young - a child in this camp - and wants nothing more than to go to her own home."

The Rajapaksa regime "still has a chance" to take action that would satisfy the international community, he suggested.

"Now the fighting is over and the war is over, what's needed is generosity, magnanimity, proper devolution of power. The Tamils and Sinhalese can live in peace on this island."

The talks meant Mr Cameron arrived late to a dinner hosted by the Prince of Wales - who is ­representing the Queen as head of the Commonwealth at the summit. As he stood with Mr ­Rajapaksa and Commonwealth secretary-general Kamalesh Sharma, he was heard to say the discussions had been "lively".

Mr Cameron has insisted his presence in Sri Lanka will highlight the issues and put intense pressure on the regime, but Labour said the Prime Minister had failed to achieve anything and had missed an important opportunity.

Shadow foreign secretary ­Douglas Alexander said: "Tragically, the Prime Minister has blundered badly on Sri Lanka, and has found himself unprepared for the growing controversy surrounding the reluctance of President Rajapaksa to alter his approach to the human rights of his own citizens.

"For months Labour has called for a full and independent UN-led international investigation into the alleged crimes against humanity that took place."