The draw for the Scottish CIS Insurance semi-finals was plunged into chaos todat after the wrong teams were paired together.

The draw for the Scottish CIS Insurance semi-finals was plunged into chaos todat after the wrong teams were paired together.

Scotland's First Minister, Alex Salmond, and Presiding Officer Alex Fergusson helped select Hearts to play Dundee United and Rangers against Aberdeen during the ceremony at the Scottish Parliament this afternoon.

But the Scottish Football League later confirmed the balls pulled out had been allocated the wrong teams by Mr Fergusson.

Aberdeen have now been drawn against Dundee United, with Rangers now facing Hearts.

The Presiding Officer has apologised for the mistake.

He said: "This was a genuine error and I can only apologise for the confusion caused."

The balls drawn during the ceremony, which was televised live by the BBC, were numbered two, four, one and three.

The SFL said these should have corresponded to the following matches: Aberdeen (ball two) against (ball four) Dundee United; and Rangers (ball one) against (ball three) Hearts.

Mr Fergusson incorrectly identified ball two as Hearts, and ball four as Aberdeen.

In a statement the SFL said: "The numbers drawn were not correctly announced. Two of the numbers were transposed inadvertently by the Presiding Officer, Alex Fergusson MSP."

Mr Fergusson said: "We have worked as quickly as possible with the Scottish Football League to resolve the situation.

"As a life long Stranraer fan I think everyone can be assured that there was no ulterior motive."

David Longmuir, chief executive of the Scottish Football League, said: "The Scottish Football League has a duty to the teams involved to correct the error and to protect the integrity of the draw.

"The four clubs involved have all been informed of the error and the correct draw."

After the incorrect draw, Mr Salmond hailed the matches produced as "great ties".

He also praised his favourite side Hearts for making to the semi-finals.

Mr Salmond said: "They're great ties. Dundee United are a form team now and Hearts had a great result last night."

The semi-finals will be played on January 29 and 30, at venues to be announced, with a berth in March's showpiece final up for grabs.

Rangers won 2-1 at Motherwell last night in the quarter final, with Hearts notching up their away win at Parkhead.

Aberdeen saw off Highlanders Caley Thistle 4-1 at Pittodrie last night, with Dundee United overcoming First Division Hamilton Accies 3-1.

Mr Salmond and Mr Fergusson were joined at the draw by a representative from CIS Insurance.

CIS Cup holders Hibs were knocked out in the third round after a 4-2 defeat at home to Motherwell.

Commenting on the error, Mr Salmond said: "As soon as the mistake was realised the Presiding Officer Alex Fergusson did the right thing by owning up and moving to correct the genuine error straight away.

"Once football fans are over the shock, I am sure even Hearts fans like myself will have a wry smile and get down to planning the semi-final."

SFL president Brown McMaster insisted preserving the integrity of the draw was more important than any embarrassment.

He said: "We found out quite quickly, then we had to work out how to unravel it. The important thing is that maybe it's an embarrassment but I would rather have an embarrassment than a lack of integrity.

"We insisted that it had to be changed but we got co-operation from the Scottish Government and CIS.

"It was important to us that the way the draw was made was the way the games are to be played."

He added: "It's unfortunate. It's an error, the Presiding Officer has apologised for it and the integrity has remained intact.

"It would have been more embarrassing if we had left it. It would have come out so I think we did the right thing, we moved as quickly as we could.

"It's not an ideal scenario but it was a genuine mistake and the man who made the mistake has apologised profusely.

"I think everyone is happy with the final outcome."