The Sun has apologised for misspelling the surname of Jacqui Janes on its website, days after the News International title attacked Gordon Brown for making a similar error in a letter of condolence over her son's death in Afghanistan.

Earlier this week the Sun misspelt Janes's surname as "Jones" in an online article on the My Sun section of the newspaper's website.

The gaffe followed a series of front-page articles in Rupert Murdoch's tabloid taking the prime minister to task for a series of mistakes, including spelling Janes's surname as "James" in a condolence letter over the death of her Grenadier Guardsman son Jamie Janes in Afghanistan.

The Sun's online article was a follow-up stating that Brown had "blundered again" by rowing with Janes over the phone as he attempted to apologise over the mistake-strewn letter of condolence.

"Earlier this week on a My Sun discussion block, the surname of Jacqui Janes, the mother of guardsman Jamie Janes, was spelled incorrectly," said the Sun in an online apology. "As soon as we became aware of the error it was corrected. We are happy to apologise for the mistake."

Lord Mandelson argued that the attacks on Brown represent the latest attempt by the Sun to actively campaign against Labour in the run up to next summer's general election. The Sun announced during Labour's party conference in September that it would be backing the Conservative party.

The government has argued that the Sun, which has a daily weekday circulation of more than 3m, no longer has the power to influence the outcome of a general election – as the newspaper famously claimed after John Major won in 1992.

• To contact the MediaGuardian news desk email editor@mediatheguardian.com or phone 020 3353 3857. For all other inquiries please call the main Guardian switchboard on 020 3353 2000.

• If you are writing a comment for publication, please mark clearly "for publication".