THE new Lochs councillor has apologised after she was accused of linking her own party’s officials to Nazis in a post on Facebook.

Mary Lockhart, who won the seat for Scottish Labour in a by-election at the end of August, was protesting against a decision to ban a number of Labour members from voting in the upcoming leadership contest.

In response, the Fife councillor, who represents Kelty and the Benarty villages, quoted a famous poem by Pastor Martin Niemöller about Nazi persecution.

Ms Lockhart wrote on the social media site: “Who will they expel next? I have friends who are genuinely fearful!”

Underneath, she posted: "First they came for the socialists, and I did not speak out ... because I was not a socialist.

"Then they came for the trade unionists, and I did not speak out ... because I was not a trade unionist.

"Then they came for the Jews, and I did not speak out ... because I was not a Jew.

"Then they came for me ... and there was no-one left to speak for me."

The Facebook message was posted earlier this month.

A Scottish Labour spokesman said: "This kind of comparison is unacceptable. All elected representatives and party members have a duty to conduct themselves in an appropriate manner."

Ms Lockhart apologised for any offence caused.

In a statement, she said: "I have found Pastor Neimoller’s most widely-quoted poem inspiring since I first encountered it when the rector of my school used it as a text on which to base his address at a school assembly.

"It is, in my view, a poem about having the courage to speak up for others experiencing adversity, whether you agree with their views or not, and it seems to me to underline some of the fundamental values of the Labour Party, namely solidarity.

“In posting it on Facebook, I had no intention of implying that suspensions or expulsions from the Labour Party were comparable to the Holocaust or to the deliberate extermination of Jewish people, Lutherans, disabled people and homosexuals which cast a long shadow over the 20th century and beyond.

"I am deeply sorry if the post, in solidarity with a friend whose membership has been suspended, was interpreted as making such a comparison."

Ms Lockhart polled the most votes in a by-election which was called following the decision of Willie Clarke, who had been a councillor for 40 years, to stand down.

Her win was hailed by the SNP who pointed out she was a pro-independence candidate.

At the time Scottish Labour deputy leader Alex Rowley hailed it as a “watershed moment” for Labour to field an openly pro-independence candidate.

Scottish Conservative MSP Murdo Fraser said: "It shows just how much of a state the Labour Party is in when newly-elected councillors are suggesting colleagues are Nazis."

A Lib Dem spokesman said that there were differences of opinion within every political party "but most people manage to resolve arguments without elected officials comparing apparatchiks to the Nazis".

The by-election in The Lochs area of Fife was triggered by the resignation of Willie Clarke, the UK's last elected Communist councillor.

Some Labour members have accused the party of denying them a vote because of their support for current leader Jeremy Corbyn.

That has been denied by Labour which says it has a robust validation process to ensure every vote is valid “according to the party’s rules and agreed procedures”.