Media playback is unsupported on your device Media caption The rail journey from London to Glasgow in five minutes

Virgin Rail has lost its bid to continue running the West Coast Mainline and will be replaced by the UK's largest rail operator, FirstGroup.

A disappointed Sir Richard Branson said Virgin would "almost definitely back out" of bidding for more franchises.

FirstGroup said it would "offer substantial improvements in the quality and frequency of services".

Rail unions warned they would resist any attempts to cut staff pay or working conditions.

Aberdeen-based FirstGroup already operates a number of rail routes including Great Western and ScotRail.

The company, under the name First West Coast Limited, will take over the franchise from 9 December and is due to to operate the service until 2026.

More seats

The West Coast Mainline route serves 31 million passengers travelling between London, the West Midlands, the North West, North Wales and the central belt of Scotland.

FirstGroup said it would introduce 11 new 125mph six-car electric trains on the Birmingham-to-Glasgow route and provide more direct services between destinations.

Additional Pendolino tilting trains currently being introduced by Virgin will deliver more than 28,000 seats a day.

Analysis This comes down to whether FirstGroup can deliver on its promise to attract millions more customers to the West Coast mainline. The company will have to find an average of about £390m a year in premium payments to the government (it's much less at the start of the franchise and gets much bigger as the years roll on). Virgin currently pays about £160m. If FirstGroup struggles, it could be forced to hand back the franchise early, which will cost it a lot of money and could put its other UK franchises at risk. There is a lot at stake, for the company and the government. Sir Richard Branson thinks the deal is doomed to failure. FirstGroup, which is already the biggest rail operator in the UK, begs to differ. As they say, time will tell.

The government says FirstGroup's new trains should add further 12,000 seats a day on West Coast routes from 2016.

FirstGroup's chief executive Tim O'Toole said it was a good deal for the company and the public.

"Our bid also delivers value for taxpayers by returning premiums to the government underpinned by sustainable growth in passenger numbers and revenues from the utilisation of significant available capacity," he said.

Higher payments

First West Coast says it will return £5.5bn at net present value to the government over the franchise term.

That is believed to have been much higher than the amount offered by Virgin Rail, which is 49%-owned by another transport company, Stagecoach.

In a statement, Stagecoach said the reason it had failed to secure the new franchise was because FirstGroup had contracted to pay "significantly higher premium payments" to the Department for Transport.

BBC transport correspondent Richard Westcott says the West Coast franchise is the first of several big rail franchises up for grabs over the next few years, and the government is under pressure to get a good deal.

Media playback is unsupported on your device Media caption Sir Richard Branson says Virgin is set to "back out" of future bids to operate rail services after losing the franchise to run the West Coast mainline

But there are concerns that FirstGroup may have bid too much for the franchise.

"There have been many examples… where there have been very aggressive bids which the government has awarded and then quite soon afterwards, the people have handed back the keys and walked away from the contract without any real penalty," said Stephen Glaister, Professor of Transport and Infrastructure at Imperial College London.

"That's a very unsatisfactory situation from a public interest point of view."

As part of its contract, First West Coast would have to pay £265m in penalties if it were to terminate the contract early or fail to make scheduled payments to the government.

The trade unions have also warned FirstGroup that they will vigorously resist any attempts to reduce running costs by cutting pay or working conditions.

RMT general secretary Bob Crow said: "They should be left in no doubt that we will mount a massive industrial, political and public campaign to stop any attacks on our members' jobs and the services that they provide to the travelling public."

'Bitterly disappointed'

Sir Richard Branson's Virgin Rail has operated the West Coast franchise since 1997 after the privatisation of UK railways.

He said said Virgin's loss of the franchise was "very disappointing news" and added that his company's bid had been a realistic one.

"We did not want to risk letting everybody down with almost certain bankruptcy at some time during the franchise, as happened to GNER and National Express who overbid on the East Coast mainline," said Sir Richard in a statement.

Media playback is unsupported on your device Media caption "It's a shame really, we're used to Virgin"

Three years ago, the government stripped National Express of the franchise to run the East Coast Mainline for failing to make payments promised to the government under its contract.

"Sadly, the government has chosen to take that risk with FirstGroup and we only hope they will continue to drive dramatic improvements on this line for years to come without letting everybody down," Sir Richard added.

He said the government's current bid process was "flawed" and that Virgin Rail was extremely unlikely to bid again for a franchise.

"The process is too costly and uncertain, with our latest bid costing £14m. We have made realistic offers for the East Coast twice before, which were rejected by the Department for Transport for completely unrealistic ones, and therefore will have to think hard before embarking on another bid."

Sir Brian Souter, the chief executive of Virgin's franchise partner Stagecoach, said: "I am bitterly disappointed that Virgin Rail has been unsuccessful in its bid.

"After 15 years, it is difficult to imagine a West Coast rail service without the Virgin brand."

Track record

Successive governments have had a poor track record in awarding rail franchises.

In some cases, train operating companies have defaulted on their contracted payments to the government. This was the case with Bermuda-based Sea Containers and National Express, the successive operators of the East Coast Mainline before it was temporarily re-nationalised last year.

Media playback is unsupported on your device Media caption Tim O'Toole, FirstGroup: "It's good for the passengers"

In many other instances, companies manage to meet their annual payments while making losses.

Under what is known as the revenue support scheme, the government takes on 80% of the company's losses. Stagecoach's East Midlands Trains and Arriva's Cross Country Trains are both being subsidised by taxpayers.

FirstGroup's own First Great Western Trains was in revenue support before it handed back the franchise last year.

However, under the current government franchise contracts, companies will not be offered this option. Instead, they will have to hand back the franchise, which will be re-auctioned by the government.

That raises the stakes for FirstGroup.

"Economists have openly said that if FirstGroup have got this wrong, it will probably kill off the group. Some people are saying they've bet the farm and everything they own on it," said Tony Miles of Modern Railways magazine.

Economic conditions have already worsened since FirstGroup submitted its bid. At the time, the economy was forecast to grow 0.3%, whereas now the government forecasts stagnation.

FirstGroup investors appeared to be unconvinced by the deal. Shares in the company were down 7% in late London trade. Shares in Virgin Rail partner Stagecoach rose 2%.