A £1.2bn Cardiff Capital Region deal has been signed to improve public transport and bring economic growth over the next 20 years.
It includes £734m for the south Wales Metro, bringing better rail and bus travel in the capital and valleys.
It also involves 10 local councils and aims to bring 25,000 new jobs and an extra £4bn in private sector investment.
First Minister Carwyn Jones said it was a "vote of confidence in the region".
The announcement was made on the eve of Chancellor George Osborne's Budget and a year after he promised talks to set up the deal.
He called the deal "fantastic" and said it would hand "real power to local decision makers that are best placed to ensure the Welsh economy is fit for the future".
City deals are a way of different levels of government financing big infrastructure projects and regeneration over long periods of time.
The one agreed for the Cardiff region will run over 20 years - not the typical 30 years - which those behind it hope will mean funding will be delivered faster.
WHAT THE CITY DEAL INVOLVES
- The South Wales Metro - to include the £500m Valleys electrification programme - longer trains, faster buses and some light rail
- £495m for other projects including an "innovation district" and investing in a software academy, data innovation, a cyber security academy and new approaches to public service delivery.
- Better wi-fi on public transport
- Increasing house building
- Not included in the £1.2bn pot is confirmation of an extra £50m from the UK Government to help develop the compound semiconductor centre - the technology behind smartphones - being set up by Cardiff University and IQE
HOW THE DEAL STACKS UP
- Welsh Government £580m within the first seven years
- 10 councils £120m
- The Treasury £580m
Representatives of 10 councils and the Welsh and UK governments were at the announcement in Cardiff.
Cardiff Council leader Phil Bale said: "Financially we have secured a bigger deal for our residents than the Glasgow city deal, but the real work starts now.
"We want this deal to make a real difference to people's lives, improving prospects for all our citizens."
Rhondda Cynon Taf council leader Andrew Morgan added that it would "enable us to unlock significant economic growth, and bring about social improvements and regeneration".
Welsh Conservative leader Andrew RT Davies called it a "once in a generation opportunity" and a "game-changing moment for the regional economy".
Councils signed their own agreement in November, a milestone for the deal.
A cabinet of 10 council leaders will be involved in driving the project, while a regional business organisation and economic growth partnership will also be created.
The programme will look at how nearly half of Wales' population can benefit from better public transport links and from business being attracted into the area.
The population of Cardiff is forecast to increase by more than a quarter over the next 20 years - one of the fastest growing in the UK.
The city has been stressing that as well as the strengths of its workforce and universities, it has a location still within reach of London, with hopes this will be even easier once rail electrification comes.
The Swansea region last month outlined its own £500m city deal proposals, which involve a vision of an "internet coast" to provide super-fast broadband and develop a new digital era for energy industry.