Image copyright Getty Images Image caption JK Rowling lives in Edinburgh with her family and is the author of the Harry Potter books

Regulators are to investigate a charity after an abusive tweet about author JK Rowling's £1m donation to the pro-UK campaign appeared on its official feed.

The Dignity Project, which carries out work to improve the lives of children in Africa, described in a tweet that the Harry Potter creator was a "bitch".

The group later claimed its account had been hacked.

A spokesman for the office of the Scottish Charity Regulator said it was "currently considering" the matter.

The tweet has been condemned by both sides of the referendum campaign.

Rowling hit the headlines on Wednesday morning when she blogged that she had made a "substantial" donation to Better Together, the official voice of the pro-Union campaign.

Shortly after, a comment on the Dignity Project's Twitter feed read: "What a #bitch after we gave her shelter in our city when she was a single mum."

Yes of course some daft folk will say some daft things and when they do they should apologise for it Alex Salmond, First Minister of Scotland

Pro-independence supporter Patrick Harvie MSP reacted on his Twitter account by saying: "A comment like that is a disgrace to the Yes cause, and to the cause of social justice."

A spokesman for the charity regulator told the BBC: "Charity trustees have an overall duty to act in the best interests of the charity.

"As regulator, we have an established complaints procedure for anyone to bring concerns to us.

"We are aware of the twitter post in question and are currently considering it."

On its website, Dignity Project posted a statement divorcing itself from what had appeared on its Twitter feed.

It read: "The Dignity Project has had its Twitter account hacked. We are not responsible for any tweets that have been sent.

Image caption A disclaimer later appeared on the Dignity Project website

"As a charity we do not take any political stance and our opinion is people are free to donate to whoever they choose.

"To the people who hacked our account, if helping African children to thrive and survive including single mums is bad thing that is their problem."

Earlier in the day when asked whether Ms Rowing should "brace herself" for attacks on social media, First Minister Alex Salmond said: "I think everybody's entitled to express a view in whatever sense.

"Whether it's Chris or Colin Weir supporting the 'Yes' campaign or JK Rowling supporting the 'No' campaign, people are entitled to express their support without being attacked anywhere."

The first minister also defended the tone of the debate so far, saying: "Yes of course some daft folk will say some daft things and when they do they should apologise for it - but don't let's pretend the debate we're having in Scotland is anything other than an exemplar of how to conduct a democratic debate."

The Scotland Malawi Project, an umbrella organisation of which the Dignity Project had been a member until 2009, disassociated itself from the charity and the offensive tweet.

Its spokesman David Hope-Jones said: "We are absolutely disgusted by the comments made earlier today by the Dignity Project.

"They do not in any way speak on behalf of the Scotland Malawi Partnership or any of our members. We have contacted them and asked them to remove all reference to us [from their website]."