Movies

J.K. Rowling is sorry she killed off Dobby

Dobby the house elf is finally getting his due.

Early Wednesday morning, “Harry Potter” author J.K. Rowling tweeted out a somber apology to her 14.4 million followers: “This year, I apologise for killing someone who didn’t die during the #BattleofHogwarts, but who laid down his life to save the people who’d win it. I refer, of course, to Dobby the house elf.”

A number of fond remembrances of Dobby — the selfless, onetime servant of Potter’s rival, Lucius Malfoy — followed.

Dobby’s death “was like being punched in the heart repeatedly,” one Twitter user writes. “Don’t trust anyone that didn’t cry about Dobby.”

Another user got Rowling’s attention with her testimonial: “At first I didn’t like Dobby, but I wish I could be more like Dobby, his death in book & on film always makes me cry.”

“That answer really touched me, Anna,” the Potter creator writes in response.

Dobby, who dies by the blade of Bellatrix Lestrange’s knife in the 2007 book “Harry Potter and the Deathly Hallows,” is beloved as one of the series’ most noble characters.

After Harry helps him win his freedom from the sinister Malfoy family, Dobby pledges his loyalty to the Hogwarts student.

Eventually, he sacrifices himself so that Harry and his friends could go on to save the world from Lord Voldemort.

On Wednesday, the 20th anniversary of the Battle of Hogwarts, Dobby is being held up as a hero.

And Rowling, like Dobby, is free . . . of the guilt over his death she’s apparently been carrying around.