Alex Salmond's crowdfunder to assist with legal costs in his case against the Scottish Government has reached its £50,000 target in less than 12 hours.

The former first minister launched the online fundraiser on Wednesday night as he announced his resignation from the SNP, amid sexual harassment complaints against him.

The complaints from two women date back to December 2013, when Salmond was still in office, and supposedly took place in Bute House, the official residence of the First Minister.

He denies the allegations and is taking the government to the Court of Session to contest the complaints process activated against him, which he deems to have been unfair.

In a YouTube video, the politician said he would reapply for SNP membership after he clears his name.

He also announced the crowdfunder to help cover the "huge" costs of the judicial review which his lawyers have launched against the government.

But Scottish Labour slammed the fundraising drive, which has already raised nearly £70,000, as "unbelievable".

The party added: "Alex Salmond is abusing his power, and dragging Scotland into the gutter."

The allegations about Salmond's conduct towards two women first emerged last week when the former MP released a statement prompted by an inquiry from the Daily Record.

The newspaper published what it claimed were details of one of the complaints over the weekend.

Police Scotland confirmed last Friday that the complaints have been passed to the force but said its assessment of the claims was still at an early stage.

But Salmond has refuted all claims of harassment and on Tuesday wrote to the Scottish Government's permanent secretary Leslie Evans demanding an inquiry into the case.

He says the complaints process has denied him the right to put his own case forward properly and has been dogged by leaks to the press which have "flagrantly and repeatedly" breached his confidentiality.

The Scottish Government has vowed to "vigorously" defend itself against Salmond's accusations in court, and has alluded to "material inaccuracies" in his public statements.

Nicola Sturgeon's administration established a new procedure on handling harassment complaints involving current or former ministers in December last year.

This process was established in the wake of the #MeToo movement, which saw allegations of sexual harassment and sexual assault levelled against a host of high-profile men around the world.

In his video posted late on Wednesday, Salmond said the identity of the person who leaked details of the complaints against him to the Daily Record needs to be "urgently" established.

The former first minister said: "I've been a member of the Scottish National Party for 45 years, 20 of them as party leader and seven as First Minister of Scotland.

"I hope I've done the party - and the broader cause of independence - some service. I I truly love the SNP, and the wider independence movement. They've been the defining commitment of my life.

"But today I've written to the national secretary of the party, resigning my membership.

"I read carefully Nicola Sturgeon's statement and watched her television interview.

"She made it clear that the SNP have never received a single complaint about my conduct in my many decades of membership.

"And the Scottish Government have confirmed they did not have any such complaint before this January - more than three years after I left office."

He added: "So let me be clear again - I refute these two complaints of harassment, and I absolutely reject any suggestion of criminality.

"I believe that all such issues must be treated seriously, confidentially and through a fair process.

"In this case, confidentiality has been broken, greatly to my detriment, but also in a way that now puts at serious risk the anonymity of both complainants.

"It urgently needs to be established - who breached that duty of confidence? And why?"

Salmond continued: "It seems obvious that Nicola feels under pressure from other political parties to suspend me from SNP membership, given recent party precedents.

"For my part I have always thought it a very poor idea to suspend any party member on the basis of complaints and allegations. Innocent until proven guilty is central to our concept of justice.

"However, I did not come into politics to facilitate opposition attacks on the SNP and, with parliament returning next week, I have tendered my resignation to remove this line of opposition attack.

"Most of all I am conscious that if the party felt forced into suspending me it would cause substantial internal division.

"In my letter to the national secretary I state that it is my absolute intention to reapply for SNP membership just as soon as I have had the opportunity to clear my name.

"I hope that is by the end of this year. In the meantime I would urge no one else to relinquish their SNP membership."

The former first minister currently hosts The Alex Salmond Show on Russia Today (RT), for which he is thought to receive a six-figure salary, with the latest episode due to air on Thursday.

His crowdfunder page calls for donations to help with the "huge" costs of the judicial review.

Salmond wrote: "Many have asked how they can help directly. Therefore I have established a crowdfunder to assist with costs.

"All sums received will contribute exclusively to progressing the judicial review and any money left over will be used to support good causes in Scotland and beyond."

Labour insisted "decent people will rightly be furious" that the former first minister is raising money in such a fashion.

Scottish Labour's business manager and women's spokesperson Rhoda Grant said: "That an independently wealthy man with his celebrity and political power is to raise legal fees through a crowdfunder for a case ultimately linked to sexual harassment is unbelievable.

"It suggests that he is sending a signal to those who have made allegations that he has the upper hand.

"Decent people will rightly be furious that he is to raise money to take the Scottish Government to court.

"Alex Salmond is abusing his power, and dragging Scotland into the gutter."

A spokesman for the Scottish Conservatives said: "This is an overdue move, but one that plunges Scotland's governing party into turmoil.

"The fact he now has the brass neck to publicly crowdfund in the same breath as seemingly doing the right thing is astonishing.

"Scotland now faces the incredible and unprecedented situation of its most famous former first minister appealing to SNP supporters for cash to take legal action against the government he used to run."

A number of politicians, including SNP MP Alison Thewliss and Scottish Labour MP Danielle Rowley, took to Twitter to instead highlight crowdfunders by Women's Aid and Rape Crisis Scotland.

Linking to one, Rowley tweeted: "Instead of donating to a rich and powerful man, I have a better idea."

First Minister Nicola Sturgeon has said she is "upset" at Salmond's decision to resign from the SNP and called on due process to be allowed to take its course.

She said: "I feel a huge sadness about this situation. Alex has been my friend and mentor for almost 30 years and his contribution to the SNP and the independence movement speaks for itself.

"While the decision to resign has been Alex's alone, I understand why he has chosen to separate the current questions he is facing from the day to day business of the SNP and the ongoing campaign for independence.

"These last few days have been incredibly difficult for the party and, I am sure, for those involved in the complaints that have been made to the Scottish Government.

"I appreciate that they will have been difficult for Alex too."

Sturgeon added: "I know party members will be upset by this news, just as I am.

"I also know there are many questions that can only be answered in the fullness of time.

"It is important now that any legal processes are allowed to take their course."