Flyglobespan went into administration on Wednesday
Finance Secretary John Swinney has said that collapsed Scottish airline Flyglobespan was "badly let down" by a company handling its credit bookings.
The Edinburgh-based airline went into administration on Wednesday, leaving 550 staff without a job and thousands of passengers stranded abroad.
Mr Swinney said Flyglobespan was owed £34m by E-Clear, the company which processed its credit card payments.
He said £20m of this was for passengers who had already flown.
The finance secretary said it was "beyond dispute" the money should have been in Flyglobespan's bank account.
He added the company would have had "a better chance of survival" if the money had been passed on.
Costa Blanca: 514
Costa del Sol: 393
Sharm El Sheik: 292
Gran Canaria: 226
Glasgow 133 (non-UK)
Edinburgh: 80 (non-UK)
The finance secretary said: "This company has been badly let down by the fact that a private company, handling bookings on their behalf, has not paid them money that they were due. That is the inescapable commercial reality of what has been faced here."
Mr Swinney added: "The key issue is about making sure that, in the private market, companies honour their commitments.
"Here E-Clear have held on to money that should have been passed on the Flyglobespan and as a consequence employees of Flyglobespan and members of the travelling public are now experiencing real difficulties."
Mr Swinney said Holyrood Transport Minister Stewart Stevenson had met Flyglobespan bosses in September, adding that the company had said then that "they had the expectation that they would need to borrow some more money to sustain some of their activities".
A statement from the directors of E-Clear offered "deepest sympathy for the customers and staff of Flyglobespan".
It said: "E-Clear is committed to working closely with the administrators of The Globespan Group to clarify and address the various complexities around the airline's financial position, so that matters may be resolved as quickly as possible."
BBC Scotland business editor
Globespan could no longer get insurance industry cover from July last year - before the collapse of Zoom and XL.
So E-Clear's response after that was to insure itself by withholding money for much longer.
But here we get to the really interesting bit.
Earlier this week, Globespan's chief executive, founder and chief shareholder, Tom Dalrymple, issued a couple of statements saying the airline management continued to be in discussion with a company called Halcyon Investments, about an injection of capital.
Halcyon had been in discussions with flyGlobespan going back at least as far as September, which was around the point when others who were interested in investing in the airline pulled out.
What do we know about Halcyon Investments?
E-Clear's chief executive officer Elias Elia said: "As one of the world's leading payment card processing companies, we have many years' experience in the airline industry and we will bring this expertise to bear in pursuit of an equable solution that reflects the interests of all parties."
Administrators PricewaterhouseCoopers (PWC) said on Thursday there was no choice other than to cease flights and make redundancies.
Out of the 650 workers at the Edinburgh-based firm, 550 are now without a job.
Bruce Cartwright from the administrators said everything was being done to ensure that 4,500 stranded holidaymakers would be brought home.
He said the remaining 27 of 60 crew left stranded abroad would return home on Friday.
They, along with Flyglobespan customers, have been using extra flights and special fares laid on by rival airlines.
Unite said the collapse was a "tragedy" for travellers and for staff who face a Christmas without pay.
Brian Boyd, the union's national officer for civil aviation, said: "Along with thousands of passengers stuck overseas, the Flyglobespan employees have been thrown into a Christmas of misery with no wages and no job."
Flyglobespan operated flights from Edinburgh, Glasgow and Aberdeen as well as transatlantic services from other UK airports including Manchester, Gatwick and Belfast.
An estimated 3,400 holidaymakers were left stranded in Spain, Portugal, Cyprus and Egypt.
About 1,100 customers of Globespan package holidays were also left abroad, but they are covered by the Civil Aviation Authority-run Air Travel Organisers' Licensing (Atol) scheme which guarantees refunds and return flights.
Passengers can either call on 0131 466 7612/7607 or on 0141 332 3233, or +44 141 332 3233 from outside the UK.