An openly gay woman has been elected leader of the Scottish Conservatives after the membership rejected her leading rival's radical proposals to create a new centre-right party.

Ruth Davidson, 32, widely seen as David Cameron's favourite, was chosen to lead the Scottish Conservative and Unionist party by a comfortable margin after the most bitterly-fought and divisive leadership campaign in party history.

Officials in London believe that Davidson, a lesbian and the youngest of the four candidates, will be able to freshen up the Tories' faltering appeal to Scottish voters.

She has only been an MSP for six months after working as a senior aide to Annabel Goldie, the departing party leader and campaigned against any significant increases in the Scottish parliament's powers.

Her victory saves the prime minister from the embarrassment of watching the UK party being split by Davidson's rival for the leadership, Murdo Fraser.

In a statement released on her election, Davidson said: "With the radical, generational change that I represent, this is a unique opportunity for us to rebuild the party and to once again become a powerful, meaningful and relevant force in Scottish politics and in Scottish life."

A former Territorial Army officer and kick-boxer, Davidson campaigned vigorously against Fraser's dramatic proposals to scrap the party and replace it with a new "progressive" organisation which would be independent of David Cameron's Tories.

Fraser's proposals, based on his belief that the Tory brand was "toxic" to Scottish voters, won the support of many prominent Scottish figures, including the Tory MEP Struan Stevenson, Sir Malcolm Rifkind, Alex Fergusson, the former Holyrood presiding officer, and a clear majority of the 11 MSPs not standing in the leadership election.

He said it would revitalise centre-right politics and enable the rebranded Tories to attract hundreds of thousands of disenchanted voters. Failing to do so would see the party disappear, he said. The proposals instead led to civil war within the party, and were described as "madness" by his critics.

Davidson, who only joined the party in 2009 to fight the Glasgow North East byelection after a career as a BBC journalist, vigorously attacked Fraser's proposition.

Supported by other senior figures such as Lord Forsyth, she accused Fraser of an "existential crisis" and "wringing his hands" about the future of the party, which has repeatedly fared badly in the polls. The party has only succeeded in returning one MP to Westminster in the last three elections, and lost two seats at Holyrood in May.

Her victory now presents the Scottish Tories with the delicate task of reuniting a party left deeply split and in open warfare over Fraser's proposals. She remains the most politically and professionally inexperienced party leader at Holyrood.

She said: "A political party isn't a leader. A political party is its membership and I want to bring our members, at all levels, much closer together and to take our party forward in unity.

"We've had a number of very robust hustings up and down the country. [It] has been lively, it has been energetic but it has really engaged our members. All of us can be proud about how we've increased the debate about Scottish Conservatism going forward, a Scottish Conservatism that will be alive and kicking."

Davidson was quickly congratulated on her victory by her Labour and Liberal Democrat opposite numbers. Iain Gray, acting leader of the Scottish Labour party, said: "She has shown a lot of energy and drive to win her party's election. While I disagree with her fundamentally on politics I look forward to the contribution she will make to the Scottish parliament."

Willie Rennie, leader of the Scottish Liberal Democrats, added: "I am really pleased to congratulate Ruth on her new appointment as leader of the Scottish Conservatives. I look forward to working with her, in her new role, as we strive to hold the SNP government to account."