SNP backbencher Tricia Marwick has been elected as the new presiding officer of the Scottish Parliament, in the wake of her party's election win.

The Mid Fife and Glenrothes MSP won the five-year job in a ballot of Holyrood's 129 members.

Ms Marwick pledged to do her "very, very best" in the role.

Labour MSP Elaine Smith and Conservative MSP John Scott were elected as Holyrood's deputy presiding officers.

Out-going presiding officer Alex Fergusson said the election of Ms Marwick, a member of the party which will form the Scottish government, presented "fresh challenges".

Labour criticised the appointment, saying it gave "cause for concern".

Ms Marwick, 57, saw off a challenge from party colleague Christine Grahame and former Labour minister Hugh Henry.

The elections were held as Holyrood sat for the first time since the SNP's landslide win at the polls, last week.

Tricia Marwick - background Tricia Marwick was born on 5 November, 1953, in the Fife town of Glenrothes. The miner's daughter worked as a public affairs officer for housing charity Shelter Scotland until her election, in 1999, as a list MSP for Mid-Scotland and Fife. She contested the Central Fife seat in subsequent elections, taking the constituency on the night of the SNP's historic win in 2007. Ms Marwick, who has previously served as SNP business manager, won the new seat of Mid Fife and Glenrothes in the 2011 Holyrood election. She has also served on Holyrood's management team, the corporate body. In the second parliament, Ms Marwick brought forward a backbench bill to introduce the single transferable vote method of Proportional Representation voting for local council elections. The move was rejected, but in reality was designed to flush out the Lib Dems, in coalition with Labour at the time, who favoured the move. Ms Marwick was also convener of the Scottish Parliament's standards committee, but stood down in 2003, amid the fallout of a row involving former SNP MSP Dorothy-Grace Elder, who had made a complaint against her. On her election as the Scottish Parliament's first female presiding officer in 2011, Ms Marwick said she would approach the job differently to her predecessors. She said the different Holyrood factions must start being kinder to each other, adding: "We've had a lot of raucous behaviour - I will not tolerate that." Ms Marwick insisted she would treat all parties equally, saying of the SNP leader: "I've stood up to Alex Salmond before. "Alex and I have known each other for a very, very long time. "Alex and I have been on opposing sides before - if necessary I would stand up to Alex Salmond as I would stand up to anybody else." Ms Marwick also has an interest in animal welfare. Brian Taylor's blog Timeline: Post-election steps Who are the MSPs?

The party will form Scotland's first majority administration, four years after it went into minority government following its victory in the 2007 election.

Paying tribute to her predecessor as presiding officer, Ms Marwick - who will resign from the SNP to take up the politically neutral post - told MSPs: "Alex was a class act and a difficult one to follow. I will do my very, very, best."

In an emotional acceptance speech, she added: "As presiding officer, I will be fair to all members. I will always act in the interests of the Scots parliament."

In his final speech as presiding officer, Mr Fergusson, who has returned to parliament as a Tory MSP, Mr Fergusson said each Scottish election had delivered a first for Holyrood - a coalition government in 1999, a "rainbow parliament" of seven parties in 2003, minority government in 2007 and, now, a likely majority administration.

Mr Fergusson, said: "The parliament itself seems to have taken this road of firsts to heart, electing a female member as presiding officer for the first time.

"Furthermore, it has also elected a member from the likely party of government for the first time and that in itself will present fresh challenges."

Mr Fergusson went on to say he could testify to Ms Marwick's "ability to put the interests of this parliament before the interests of any party within it."

In his pitch for presiding officer, Mr Henry, a former education and deputy justice minister, said he would not stand in the way of an independence referendum, which the SNP is staging in the second half of the parliamentary term.

'Big challenge'

Mr Henry was nominated for presiding officer by out-going Labour leader Iain Gray, and seconded by the Tories' Annabel Goldie.

His position came amid speculation that Nationalists would wield their majority to elect one of their own MSPs, because of fears that an opposition member could rule the referendum beyond the parliament's powers.

Labour business manager Paul Martin, said: "The appointment of the new presiding officer was a big challenge for the new majority government, and it has not got off to a good start.

"Labour wants to engage positively with it, but this appointment does not send out the right signal and is a cause for concern."

The election for first minister - with SNP leader Alex Salmond the only realistic candidate - is taking place at a later date.

Mr Gray and Miss Goldie have both announced they are standing down from their leadership roles in the autumn, while Tavish Scott earlier quit as Lib Dem leader with immediate effect.