About 4,000 public servants will move to a new hub at Cardiff's Central Square, it has been announced.
The UK government has taken a 25-year lease on 265,976 sq ft (24,710 sq m) of space from 2020 - with developers claiming it is the largest office deal ever signed in Wales.
Work on the former Cardiff bus station site began in 2014, with BBC Wales set to move there from 2019.
HM Revenue and Customs will move from their Cardiff base in Llanishen.
As well as the hub becoming one of 13 regional tax office centres in the UK, other government departments such as the Office for the Secretary of State for Wales will move there.
The site, next to Cardiff Central railway station, is already home to firms including Hugh James solicitors, Hodge Bank and Motonovo Finance.
"Cardiff is going head to head with all the major cities around the UK as we look to attract jobs and investment," he added.
A UK government spokesman said the deal formed part of a drive to cut its buildings from 800 to 200 by 2022.
Secretary of State for Wales Alun Cairns said it would show the government is "visible, accessible and helping to improve people's lives".
HMRC chief executive Jon Thompson said it will work with Cardiff council to redevelop their current base at Ty Glas, which houses 2,800 staff, following the move.