THE election for the first Scottish Parliament for 300 years was marred last night by allegations of vote-rigging in Dundee.

Police sealed off the building at the counting station for the Dundee constituencies and searched all people leaving the premises after the claims were made by SNP activists.

They had alleged that ballot papers were being smuggled out of the hall and flushed down a lavatory. Extra police officers who were in reserve, including CID, were drafted in to help to staff the entrances and investigate the allegations.

But the count continued after police found no evidence that papers were missing.

The presiding officer for the Dundee West seat had told police that she believed that 100 papers were unaccounted for after a recount of the votes. The claims brought a new twist to a night already full of drama.

A recount had been called after it seemed that the SNP was on the verge of one of its biggest upsets ever. In what is traditionally a safe Labour seat, Kate Maclean had seen her party's majority of almost 12,000 slashed to 79 after the first count.

Ms Maclean, leader of Dundee City Council, had been expected to coast to victory over first-time candidate Calum Cashley. Mr Cashley, a student, is not seen as one of the SNP's stars.

Tayside police Inspector Rod Bowman, senior officer in charge of the count, said: ''The presiding officer suggested to me that 100 votes had gone missing. As a precaution I had officers placed on the main door and had them secure every other door. It took about five minutes to ascertain that they had not gone missing. There was no search of the grounds and no extra officers were drafted in from outside the site.''

A second recount of the votes was then started after order had been restored, and Ms McLean eventually won the seat by 121 votes from Mr Cashley.

Meanwhile, a second recount of the first-past-the-post results in the Ayr constituency was ordered after nearly eight hours of counting.

It is understood that the result was too close to call between Labour candidate Ian Welsh and his Tory opponent, Phil Gallie.

Returning officer George Thorley said: ''I am ordering a full recount of this constituency alone and cannot announce any results until that is completed.''

There was a turnout of 61% in the Ayr constituency, which was regained by Labour at the General Election. Meanwhile, in the Carrick, Cumnock and Doon Valley constituency, where there was a 62% turnout, Labour was confident of a comfortable victory for former care worker Cathy Jamieson.

The declarations at the South of Scotland count were delayed because of the situation at Ayr. The regional list voting from the other eight constituencies could not be calculated until the Ayr result was finalised.

The full regional list had not been passed to the Dumfries returning officer by 6am. The Dumfries returning officer acts for the whole South of Scotland region on the proportional representation part of the vote.