Guardsman Janes died in Helmand province in October
Gordon Brown has telephoned the mother of a soldier killed in Afghanistan to apologise after apparently misspelling his name in a letter of sympathy.
Guardsman Jamie Janes, 20, from Brighton, East Sussex, was killed in an explosion in October.
In a video distributed by the Sun newspaper, his mother Jacqui called the letter a "hastily scrawled insult".
But Mr Brown said he was sorry "for any unintended mistake", adding that his writing could be "difficult to read".
Guardsman Janes, of 1st Battalion The Grenadier Guards, was killed in an explosion while on foot patrol in Helmand province.
According to the Sun, his mother Jacqui was angry when she received the prime minister's letter of condolence in which he appeared to misspell Guardsman Janes's name as "James".
In a statement, he said: "I take very seriously my responsibility to the bereaved.
Jacqui Thompson says a letter from the PM helped after her husband died in Afghanistan.
"Every time I write a letter to mothers and fathers and partners who have suffered bereavement to express my sincere condolences, it is a moment of personal sadness to me. And I am in awe of the bravery and sacrifice of the men and women of our armed forces.
"I send a handwritten letter to every family and I often write to more than one member of the family.
"I have telephoned Jacqui Janes to apologise for any unintended mistake in the letter.
"To all other families whom I have written to, I can only apologise if my handwriting is difficult to read."
The prime minister has previously admitted problems with his eyesight after a childhood rugby injury.
He added: "I have at all times acted in good faith seeking to do the right thing. I do not think anyone will believe that I write letters with any intent to cause offence."
'Debt of gratitude'
But Mrs Janes told the Sun that the letter had been "scrawled so quickly I could hardly even read it" and that "some of the words were half-finished".
She described it as "disrespectful" and an "insult" to her son.
It has emerged that Mr Brown got Jamie Janes's name wrong in the House of Commons on 14 October when he read out a list of 37 soldiers killed in Afghanistan.
The reason this is a story is because of the widespread sense of doubt about the continued value of British forces fighting and dying in Afghanistan
The Sun declared during the Labour Party conference that it was switching its support to the Conservatives for the next general election.
George Pascoe Watson, who was the newspaper's political editor until last week, told BBC Radio 4's World at One programme that it was not the Sun attacking the prime minister but Mrs Janes herself.
He added: "The Sun, believe it or not, doesn't want to personalise it on the prime minister although in a case where a prime minister has written a personal letter it's hard not to personalise it."
Business Secretary Lord Mandelson said the story had to be seen in the "context" of the fact that the Sun had chosen to "campaign against Gordon Brown and Labour" in the run-up to the next election.
He added: "Anyone who knows the prime minister knows that his handwriting is not great.
Lord Mandelson: "His handwriting is not great"
"But it is absolutely unthinkable that he would want to show any sort of disrespect, not only to Mrs Janes, but to all those who have suffered bereavement and to whom he writes letters.
"He cares very deeply about them, which is why he puts a lot of thought into those letters. I hope, as he and others will do, that Mrs Janes will understand that and not take any offence."
It is official policy for the prime minister to write to the families of all service personnel killed in action while on operational duties.
According to Ministry of Defence guidelines published on the Parliament website, the letter is drafted by military officials and should ideally be sent within two working days of the death being announced.
The defence secretary writes to the families of members of the armed forces who die in service, including those not on operations.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.