A £14bn defence training academy which would have created 2,000 jobs in the Vale of Glamorgan has been scrapped.
The project at St Athan has been axed as the UK government announced cuts of up to 8% in the defence budget.
First Minister Carwyn Jones said cutting the project was a "betrayal of the people of Wales".
But Prime Minister David Cameron said other options would be discussed, telling MPs: "This is not the end of the road for training at St Athan."
Welsh Secretary Cheryl Gillan said there was still "a good future" for St Athan, however her Labour shadow Peter Hain called the decision "a disgrace".
David Cameron has unveiled details of the first strategic defence and security review in 12 years.
The proposed Defence Technical College (DTC) in St Athan, which would have created more than 2,000 jobs providing training for the armed services, was already more than a year behind schedule.
It would have offered specialist engineering, communications and information systems training to all the UK's armed forces, bringing them together in one location on new premises.
The Prime Minister told MPs: "This is not the end of the road for training at St Athan".
David Cameron said the PFI programme was not affordable but he said some training would continue at St Athan.
He assured Lib Dem MP Roger Williams that discussions would take place to look at alternative options.
Earlier, in a written statement Defence Secretary Liam Fox said: "The Metrix consortium was appointed as preferred bidder in January 2007 subject to it developing an affordable and value-for-money contract proposal.
"Given the significance of this project and the opportunity to provide a world-class training facility, the Ministry of Defence has worked tirelessly to deliver this project.
"However, it is now clear that Metrix cannot deliver an affordable, commercially robust proposal within the prescribed period and it has therefore been necessary to terminate the DTR [defence training rationalisation project] procurement and Metrix's appointment as preferred bidder."
Dr Fox added that technical training focused on as few sites as possible remained the "best solution for our armed forces".
"Equally, St Athan was previously chosen as the best location on which to collocate that training for good reasons, and we still hope to base our future defence training solution there," he said.
"We will however now carry out some work before finalising the best way ahead; including to confirm both our training and estates requirement, and the best way to structure the solution that will meet them.
"To ensure momentum is not lost, work on the alternative options will begin as soon as possible and we hope to be able to announce our future plans in the spring."
Metrix chairman Charles Barrington said: "Metrix, its partners and the MoD have all worked extremely hard and in close partnership to deliver a solution which offers value for money combined with the very best technical approach to training and a rationalised estate.
"Despite the best efforts of all concerned, the combined effect of an extremely tough economic environment and numerous commercial and technical challenges meant that the project could not be delivered within the framework and timescale originally intended."
A recent Freedom of Information request to the assembly government showed it had spent more than £5m on external services and advisers on the St Athan scheme between 2007 and 2010.
The £14bn cost covers the operation of the academy's 30-year life.
Welsh Secretary Cheryl Gillan said the Ministry of Defence had made it clear Metrix was unable to deliver an "affordable, commercially robust proposal" within the required time period.
However, she said it was hoped that future defence training would be based at St Athan.
"The MoD is reviewing its training and estates requirement and has confirmed it still hopes to locate the training facility at St Athan," she said.
"In the meantime, I will be working with the Secretary of State for Defence and continuing to press the case for St Athan."
Shadow Welsh Secretary Peter Hain said it was "a disgrace that the government is binning a world-beating training facility for our armed forces".
Plaid Cymru's Westminster leader and defence spokesperson, Elfyn Llwyd MP, said Wales was once more "losing out on substantial public investment and on promises made that never materialise".
"Wales is yet again first in line for cuts. This is hardly a fairness agenda that we're seeing in action and does not bode well for tomorrow's Comprehensive Spending Review," he said.
First Minister Carwyn Jones, answering questions in the assembly from Welsh Liberal Democrat leader Kirsty Williams, commented: "What is expensive is the seven years of work that we have put in here to working with the UK Government to the delivery of the defence training academy.
"It has been ripped out from underneath our feet - 4,000 jobs will be lost to Wales as a result of a decision by your government.
"That is what I regard as a betrayal of the people of Wales."
Conservative South Wales Central AM, Andrew RT Davies, spoke of his "bitter disappointment" at the announcement, but he added that it was "some relief" that St Athan appeared to be the preferred destination in the long term.
Conservative Vale of Glamorgan MP Alun Cairns said Welsh Conservatives were "delighted" that St Athan remained the UK government's preferred location for military training.
"We are disappointed that Metrix and the MoD were unable to reach a robust agreement which proved to be good value for money for taxpayers," he said.
"It is unfortunate that the project was delayed considerably by the previous Labour government resulting in it being caught up in current financial pressures."
Vale of Glamorgan AM, Labour's Jane Hutt, said: "The jobs, opportunities and long-term skills the DTC would have provided for my constituents have been wiped out in one fell swoop today."
Kirsty Williams said it had been clear for some time that any college delivered at St Athan might have to be delivered at a reduced costs to the tax payer than originally envisaged.
She said: "I am encouraged that the government still hopes to base our future defence training solution at St Athan."