A property deal has been agreed to keep the AA in Basingstoke and safeguard 750 jobs in the town.
The motoring association is to leave its current headquarters at Fanum House and move to new offices at Basing View.
The borough council has approved a deal to release the AA from its existing lease in return for a compensation payment and on the condition that it takes over the new premises.
The AA called it "positive and great news".
A spokesman for the firm said: "We have been in negotiations with the council for some time now as Fanum House was no longer fit for purpose, we had looked at other locations to move to but why would we change course and cause all the disruption that it would put on staff by moving when we could stay in the town which has been our home for a long time?
"It's saving the jobs in the area which can only be a good thing for Basingstoke too."
Basingstoke & Deane Borough Council's member for development, John Izett, said the deal vindicated the council's decision to invest in the land preparations before leasing it to developer Abstract.
He said: "This will send out a strong message to other companies, investors and developers that Basingstoke is the place to do business."
The AA has occupied the building for more than four decades but still has 56 years remaining on its 99-year lease with the council.
The value of the deal has not been disclosed but the authority said independent advisers had confirmed it would "obtain good value".
The AA - whose business includes breakdown assistance, maps, driving lessons and financial services - is to demolish Fanum House and hand the site back to the authority for redevelopment.