SCOTLAND'S only Tory MP was forced to spend more than all his election rivals put together in order to hold on to his seat, it has emerged.

Scottish Secretary David Mundell spent almost 90 per cent of the legal maximum to defend his Dumfriesshire, Clydesdale and Tweeddale constituency.

Official election returns show Mundell splashed £46,843 on his campaign between December and May, more than three times as much as his SNP challenger, Emma Harper.

Just over £20,000 went on "unsolicited material to electors", campaign jargon for bumf through the letterbox, while another £3500 went on a dedicated campaign manager.

Scotland's only Tory MP before the election, Mundell benefitted from a massive effort by the party high command to save his seat and avoid another Conservative wipeout in Scotland.

Tory HQ in Edinburgh bankrolled the vast majority of his campaign, giving just under £39,000 in cash and services, including £14,700 to post 42,000 leaflets in March.

At the end of the splurge, Mundell's majority slumped from 4194 to 798, although he did manage to increase his share of the vote by 1.8 per cent to 39.8 per cent.

The outlay dwarfed that of the second-biggest spender, Labour candidate Archie Dryburgh.

Although Scottish Labour had a terrible election night, it started the campaign in Dumfriesshire with hopes of a win, after coming second to the Tories in the 2010 election.

Dryburgh spent just over £18,000, including £110 on an optimistic polling day leaflet claiming it was a "two horse race" between Labour and the Tories. He came third.

Harper, who started fourth based on the 2010 result, came second after spending £13,918.

LibDem Amanda Kubie spent £1582 to come fifth.

Despite claiming Mundell's seat was its top target in Scotland, Ukip spent a paltry £806 on its campaign, although candidate Kevin Newton did manage to come fourth ahead of Kubie.

Labour got the worst return on its money, with its spending working out at £2.33 per vote.

The Tories spent £2.26 per vote, while the SNP were far more efficient, at 70p per vote.

Mundell's spending was even greater than the £40,000 he spent on his 2010 campaign.

In the weeks after the election, the Sunday Herald revealed he had committed a potential criminal offence by breaching the spending limit on the last leg of the contest by £466.

Despite signing off his election return as "complete and accurate", Mundell admitted a mistake had been made and was even interviewed by the police.

He and his election agent, Joe Dawson, were ultimately forced to petition Scotland's highest court, the Court of Session, to correct what they called an "accidental miscalculation".

An SNP spokeswoman said: "David Mundell clearly felt he couldn't win his seat based on his party's policies or the their track record, and the Tories do not have a democratic mandate in Scotland."

The Scottish Conservatives declined to comment.