Media playback is unsupported on your device Media caption Nicola Sturgeon: Theresa May 'deserves thanks for her service'

Nicola Sturgeon has said Theresa May "deserves thanks for her service" as she warned of the prospect of "an even more hardline Brexiteer" becoming the new prime minister.

Mrs May will quit as Conservative leader on 7 June, paving the way for a contest to choose her successor.

Responding to the announcement, the first minister said she and Mrs May had "profound disagreements".

But she added that "leadership is tough - especially in these times".

Scottish Conservative leader Ruth Davidson said Mrs May - the UK's second female prime minister - was "a role model for girls and women across the United Kingdom".

And she said whoever replaces Mrs May will need to show how they intend to bring the country back together again after the EU and independence referendums.

Scottish Secretary David Mundell said no-one could have worked harder, or shown a greater sense of public duty, than Mrs May in delivering the result of the EU referendum.

But Scottish Labour leader Richard Leonard called for a general election be held so the public - rather than the Conservative Party - could pick the next prime minister.

What did Mrs May say?

In an emotional statement in Downing Street, Mrs May said she had done her best to honour the 2016 EU referendum result, and that it would remain a matter of "deep regret" that she had been unable to deliver Brexit.

She said it was now "in the best interests of the country" to have a new prime minister.

Media playback is unsupported on your device Media caption Theresa May said the failure to deliver Brexit was a matter of "deep regret"

Mrs May will step down as Tory leader on 7 June, with a leadership contest due to begin the following week.

She will continue to serve as prime minister until the new Conservative leader is decided by the of July - with Boris Johnson widely seen as the favourite to succeed Mrs May.

Ms Sturgeon said she wished Mrs May well, while warning that the prime minister's departure "will not solve the Brexit mess that the Tories have created".

She added: "Only putting the matter back to the people can do that. Given current circumstances, it also feels deeply wrong for another Tory to be installed in Number 10 without a general election.

"The prospect of an even more hardline Brexiteer now becoming PM and threatening a no deal exit is deeply concerning. Added to the experience of the past three years, this makes it all the more important that Scotland is given the choice of becoming an independent country."

Ms Sturgeon also said: "Regardless of our differences of opinion I hope, as I said after our first meeting, that seeing a female first minister welcoming a female prime minister to Scotland showed little girls everywhere that nothing is off limits to them."

Media playback is unsupported on your device Media caption Ruth Davidson: May 'has done the right thing'

The prime minister has faced a backlash from her MPs against her latest Brexit plan, which included concessions aimed at attracting cross-party support.

Andrea Leadsom quit as Commons leader on Wednesday, saying she no longer believed it would "deliver on the referendum result".

Mrs May met Home Secretary Sajid Javid and Foreign Secretary Jeremy Hunt at Downing Street on Thursday, where they are understood to have expressed their concerns about the bill.

Her voice shook as she ended her speech by saying: "I will shortly leave the job that it has been the honour of my life to hold.

"The second female prime minister, but certainly not the last.

"I do so with no ill will, but with enormous and enduring gratitude to have had the opportunity to serve the country I love."