Image caption Ruth Maguire, Gillian Martin and Ash Denham's private messages were shared online

Police have been called in to investigate how private messages between three SNP MSPs were leaked online.

A Twitter message exchange between the party's Ash Denham, Gillian Martin and Ruth Maguire was posted online earlier this month.

They criticised First Minister Nicola Sturgeon for being "out of step" with her party over transgender rights.

Police Scotland confirmed they had received a complaint.

A spokesman said: "We are investigating alleged access of unauthorised material. Inquiries are ongoing."

A Scottish Parliament spokesman said: "Parliamentary officials were asked to look into this matter.

"Officials quickly established that there had been no breach of the parliament's IT security and the issue was related to the Twitter platform.

"Therefore, the parliament is unable to investigate further."

Image copyright Getty Images Image caption Ms Sturgeon says the transgender proposals should not be seen as a threat by women

An image posted on Twitter - but now deleted - showed private messages between Ruth Maguire, Ash Denham and Gillian Martin.

The three exchanged messages after Ms Sturgeon said in a speech that transgender rights were not "a threat to me as a woman".

Ms Denham and Ms Martin then appeared to suggest that Ms Sturgeon, the party's leader, was "out of step" with the SNP group over the issue.

None of the three MSPs has commented on the leak.

The government wants to make it easier for trans people to change their legally recognised gender by allowing them to "self-identify".

But concerns have been raised that this could damage the legal protections given to women under the Equality Act - including the right to single-sex spaces such as changing rooms, and women-only shortlists.

Earlier this week, 15 senior SNP politicians signed a letter urging the Scottish government not to "rush" into "changing the definition of male and female". It was signed by three government ministers and several MSPs and MPs.

The letter said: "Conflating sex with gender identification affects a wide range of policy and service delivery, including data collection, education, health and social care, justice and sport. New information about this topic is emerging all the time and deserves to be properly scrutinised.

"Changing the definition of male and female is a matter of profound significance. It is not something we should rush."

The letter also stressed that all of those who signed it are "committed to human rights, equality and dignity for all people" and calls for an end to "knee-jerk accusations of transphobia" against anyone who raises concerns about the proposals.