Scottish taxpayers are facing bigger bills for legal aid because prisoners will be unable to vote in May's elections, in a breach of their human rights.

During First Minister's Questions, Jack McConnell yesterday insisted the UK government would meet the cost if any prisoners won damages in light of a landmark Court of Session ruling this week.

However, the Scottish Legal Aid Board later confirmed that, if aid-assisted prisoners launched challenges north of the border against Scottish ministers, there would be local bills in terms of legal aid or court costs. A spokesman said: "We can consider any application involving Scots law. If granted, it would be the Scottish taxpayer paying for it."

At least one prisoner will next month seek an interim interdict to halt both the Holyrood and local elections on May 3. If the bid fails, prisoners are expected to file a wave of claims for compensation.

In 2004, prisoner Robert Napier was awarded £2450 damages for having to slop out in Barlinnie jail as it breached his human rights. However, the sum was dwarfed by the associated bills paid out by ministers - £1m legal aid and over £500,000 in court costs.

Following the case, 591 other Scots prisoners were last year granted legal aid to pursue human right cases, most in relation to slopping out. This was 159 more than in the previous six years combined.

Opposition MSPs said incompetence in London and Edinburgh was to blame.

The political furore came on the back of a judgment on Wednesday by three Court of Session judges.

They declared the Scottish elections would be "incompatible" with the European Convention on Human Rights (ECHR) because prisoners will be unable to vote. The decision was expected after a European ruling in October 2005 which said the UK could not continue to impose a blanket ban on prisoners voting.

As voting law is reserved to Westminster, the UK government is consulting on which categories of prisoners should and should not be allowed to vote, but they will not amend the law until after the Scottish elections. UK ministers had time to change the law before May, but did not.

During First Minister's Questions, SNP Holyrood leader Nicola Sturgeon said Scottish ministers had abdicated their responsibility by failing to push Westminster to act more quickly, leading to the "appalling prospect" of prisoners suing for rights breaches.

Mr McConnell dismissed her claims as "nonsense", and insisted the case would not cost the devolved government "any money whatsoever".

Ms Sturgeon retorted that voters would not think prisoners suing taxpayers was nonsense. She said later: "Legal aid payments to criminals in slopping out cases amounted to nearly £2m, almost 10% of the total civil legal aid budget.

"It is likely that taxpayers will have to foot a similar bill in legal aid for cases to do with voting. That's on top of any compensation payments."

Annabel Goldie, leader of the Scots Tories, said ministers were paying the cost of incorporating ECHR into Scots law.

"Yet again, on the votes for prisoners issue, the Scottish taxpayer could contribute to a bill for damages and have to pay for legal aid funding."

John Swinburne, of the Scottish Senior Citizens Unity Party, said means-testing prisoners would stop them getting compensation. Mr McConnell said he thought "the whole land" would agree with the sentiment of the idea, even if may not be legal.

The Scotland Office said there was no threat to Scottish elections as electoral law was reserved to Westminster.

Solicitor Tony Kelly, who acted in the Napier case and is pursuing claims over voting, said although the law was reserved, Scottish ministers were still involved in the practical side of the elections, leaving them open to challenge.

For example, the Holyrood election would share polling stations, staff and counts with the local elections, in which Scottish ministers took part.

A spokesman for Mr McConnell said officials had considered this issue but did not believe this was a problem.