Rosyth shipyard has won a £30m contract to maintain two Royal Navy aircraft carriers, helping to secure 300 jobs.
The 10-year agreement will see the HMS Queen Elizabeth and HMS Prince of Wales undergo dry-dock maintenance at the Babcock's facilities in Fife.
Both vessels were assembled at the yard.
The same yard won the contract to carry out the first dry-dock maintenance of HMS Queen Elizabeth in 2019.
The UK government said the latest contract would help sustain 300 jobs at the yard and the wider supply chain.
Jeremy Quin, defence procurement minister, said: "The Queen Elizabeth class carriers are the flagships of our Royal Navy and it's crucial they remain ready to protect and defend the UK and our allies.
"Both carriers had their final construction in Rosyth, and I'm pleased they will return for their dry-dock maintenance, supporting vital jobs and skills in Scotland."
The 65,000-tonne carriers cost taxpayers £3bn each and are used to launch the F35 Joint Strike Fighter fast jets across the globe.
HMS Prince of Wales recently supported Exercise Cold Response - the largest Arctic exercise in 30 years, which saw 2,000 British personnel join 26 other nations off the shores of Norway - while her sister ship HMS Queen Elizabeth has been carrying out training in waters close to the UK.
Sean Donaldson, Babcock's managing director of marine engineering and systems at the Rosyth site, said the yard was ideally placed to complete projects of this scale.
"The programme will also benefit from the extensive knowledge and expertise of Babcock's skilled workforce which is steeped in carrier experience. It's a really proud moment for us," he said.
The UK government said the contract was awarded by Defence Equipment & Support through a robust and transparent competition, encouraging strong bids from viable dockyards.