The precise location of the building will be decided by a design competition between two sites in the city, on the Cardiff Bay waterfront and Bute Square, near Cardiff Central railway station.
Ron Davies, the Secretary of State for Wales, said battle for the assembly had been "a tale of two cities", but the case for it to be sited in the Welsh capital was just too compelling.
"In making this decision, I am mindful that Wales has invested 40 years in promoting Cardiff as our capital city. We are a small country and must build upon our achievement to date.
"Cardiff is established now not only as the capital of Wales, but as a leading administrative and financial centre which this year will host the European summit and, in l999, the Rugby World Cup."
Civic leaders in Swansea had complained that Cardiff seemed always to get preferential treatment, and making their city the home of the assembly could have rectified this imbalance.
Mike Hedges, leader of the Swansea council, insisted the choice of Cardiff would cost the taxpayer more. The Swansea Guildhall had been offered for pounds 3m, he said. "The Cardiff option will have to be done within pounds 17m, that's the government limit, but we will have to wait and see what the cost is going to be when everything is built.
"It's great disappointment that we lost and I am sure that Russell Goodway, the leader of Cardiff council, will have a big smile on his face ... We have proved at least that Swansea is deserving of more investment, it would be nice to be getting the pounds 43m year by year that Cardiff Bay is getting".
The Swansea bid had been supported by a petition signed by 120,000 people including Welsh celebrities like Sir Harry Secombe, the actress Cath- erine Zeta Jones, and West Ham footballer John Hartson.
The Welsh Office had been negotiating with Cardiff council over the possible purchase of the elegant Edwardian City Hall for the assembly.
Talks broke down, however, when Labour councillors refused the Government's offer of pounds 3.5m and demanded pounds 14.5m to take into account the cost of transferring council staff to other offices in the city.
Announcing the competition, Mr Davies said it was essential that Wales looked forwards, not backwards.
"I want this new building to be a symbol of our new democracy as we go forward with confidence into the next millennium. The new landmark will capture the imagination of the people of Wales."
The assembly headquarters is scheduled to be finished by May 2000, and, Mr Davies insisted, the pounds 17m ceiling will be strictly adhered to. In the meantime, the first meeting of the 60-member assembly will take place in the University of Wales Court Building following elections next May.Reuse content