The north east of Scotland has been allocated £504m of funding over the next 10 years to improve infrastructure and attract jobs.
A £250m "City Deal" for Aberdeen will see the UK and Scottish governments jointly invest in the area.
Separately, the Scottish government has promised £254m for key infrastructure projects in Aberdeen and Aberdeenshire.
These include better rail links and improvements to the A90 junction at Laurencekirk.
Prime Minister David Cameron later announced an extra £20m package to help the oil and gas industry.
During a visit to Aberdeen, he said the money would fund further exploration, innovation, and skills development.
The City Deal agreement was formally signed by Scottish Secretary David Mundell and the Scottish government's infrastructure secretary, Keith Brown, in a ceremony in Aberdeen.
The agreement includes funding for an energy innovation centre and the expansion of Aberdeen harbour to help the city compete for oil and gas industry decommissioning work.
The deal also includes proposals to help exploit the remaining North Sea oil reserves.
The Aberdeen agreement follows a similar deal for Glasgow in 2014.
Mr Mundell said the "historic" City Deal demonstrated the commitment of both the UK and Scottish governments to the region.
He added: "I think that it is an example of what people here in the north east and right across Scotland want to see - their two governments and their local authorities working together to deliver the transformational deal that we have got on the table today."
He said the agreement would also help to kick start "hundreds of millions" of additional funds to the region from the private sector.
Mr Brown said the deal marked "something of a red letter day" for the north east, and predicted the new oil and gas innovation centre would help to "anchor the region in terms of global research and development".
He also outlined details of the separate £254m of support offered to the region by the Scottish government, saying it would "help to cement the north east as one of the world's leading areas for business and industry.
The investment will come from future Scottish government budgets over the next five to 10 years.
It will go towards:
- An initial £200m to improve journey times and increase capacity on key rail links between Aberdeen and the central belt, upgrading the rail line in the Montrose basin
- £24m for the trunk roads programme to support improvements to the key A90/A937 south junction at Laurencekirk
- £10m for extension of digital infrastructure in the Aberdeen and Aberdeenshire area above and beyond the commitment through the City Deal
- £20m in infrastructure funding to unlock housing sites that are of strategic importance to the local authorities as well as five-year certainty on £130m of affordable housing grant.
Aberdeen City Council leader Jenny Laing said the City Deal package was "only the first stage in transforming the north east of Scotland", while Martin Kitts-Hayes, co-leader of Aberdeenshire Council, said the deal would open the doors to further investment in key areas such as infrastructure and housing.
The two council had originally bid for a deal worth £2.9bn over 20 years.
Scottish First Minister Nicola Sturgeon told Holyrood that her government would continue to press the UK government to offer more financial support to the north east.
Ms Sturgeon had written to the prime minister calling for more help for the area following job losses in the offshore industry, which is struggling due to the fall in global oil prices.
Mr Cameron is visiting Aberdeen to meet local workers and senior offshore industry executives, and is expected to announce further UK government measures to help safeguard jobs.
A new ministerial group on oil and gas, chaired by UK Energy Secretary Amber Rudd, has been set up to help support the industry.
The group met for the first time on Wednesday and agreed to produce an oil and gas workforce plan in the spring, focusing on what the government can do to support workers at risk of redundancy.
Nicola Sturgeon will visit Aberdeen on Monday for meetings with the oil and gas industry where she will make a further announcement of Scottish government action to support innovation, exploration, skills and access to finance for the North Sea industry.
The Scottish government has also called on Chancellor George Osborne to cut taxes for the industry in his budget in March.