The contract to overhaul one of the Ministry of Defence's warships has been awarded to a dockyard in Rosyth.
The contract to refit HMS Sutherland is worth £17m to Rosyth
Babcock Marine will take charge of the refit of type 23 frigate HMS Sutherland as part of a £17m deal.
Three other naval ships are also going through refits at the yard. The work on HMS Sutherland will make it one of the most advanced in the British navy.
Submarine-hunting sonar systems and a Seawolf air defence missile will be built elsewhere but installed in Fife.
The announcement was made by Defence Minister Baroness Taylor, who said the total cost of all the work would be £35m.
It includes a reshaping of the ship's stern to reduce the amount of fuel she uses.
Baroness Taylor said: "HMS Sutherland is the first of our ships to get this new equipment, making her the most powerful frigate in the fleet.
Submarine hunting sonar, with a larger hunting range
Seawolf air defence missile system
New main gun, capable of firing long-range ammunition
Reshaped stern to cut fuel use
"With an improved air defence missile system, a new long-range main gun and our latest and most sophisticated submarine-hunting sonar, she will be a force to be reckoned with."
The news has been welcomed by Mid-Scotland and Fife MSP John Park.
He said: "This is great news for the workforce and testimony to their hard work since privatisation in 1987.
"Rosyth is very much on the way up and it's future is as secure as it has ever been in recent years.
"It's vital we see increasing numbers of apprentices over the next few years and the local community benefiting from this upgrade and the new aircraft carriers in terms of growing employment levels."