The Rosyth naval dockyard has been awarded contracts to refit two Navy vessels, it has been announced.
Unions welcomed the news of the contracts
Armed Forces Minister Adam Ingram confirmed the facility will carry out work on HMS Edinburgh and HMS Walney.
The announcement was welcomed by trade unions who have been fighting a tough campaign to win the contracts.
There had been fears that a failure to secure the work would raise doubts over the future of the yard's 1,800-strong workforce.
Mr Ingram said: "Rosyth Royal Dockyards has always carried out a significant element of Royal Navy surface ship refit work and will continue to do so.
"I'm pleased to announce the decision to award the upkeep contracts for HMS Edinburgh and HMS Walney to Babcocks at Rosyth.
"I pay tribute to the workforce and the management at Rosyth for their success for being awarded these contracts."
Raymond Duguid, chair of Rosyth Trade Unions, welcomed the announcement, but insisted he would continue to fight for an inquiry into claims of an unfair advantage given to English yards.
Trade unions at Rosyth believe the Ministry of Defence (MoD) has been subsidising dockyards at Devonport in Plymouth and to a lesser extent Portsmouth by paying their running costs.
Earlier this month Mr Duguid wrote to Defence Secretary Geoff Hoon and the National Audit Office (NAO) demanding a probe into the disadvantage faced by Rosyth, which has been run by Babcocks since privatisation in 1987.
Mr Duguid said: "This announcement is very welcome. It gives us an opportunity to fight on, but it's no more than Rosyth deserves.
"We now have the time to fight for a level playing field so that we don't have to be always fighting for every contract."
Rachel Squire, Labour MP for Dunfermline West, described the contract as "excellent news" and praised the way workers at the yard "stand out for delivering contracts on or below cost, on or before time and to the highest standards".
Both Mr Duguid and Ms Squire met Defence Procurement Minister Lord Bach earlier this year to warn that the future of the Rosyth workforce would be at risk if the dockyard failed to win the HMS Edinburgh contract.
They argued that although Rosyth had secured a major role in a significant aircraft carrier contract with BAe Systems, the work was not due to start until 2007.
The pair also complained about the contents of an unpublished report by consultants Grant Thornton for the Warship Support Agency.
The report claimed that Rosyth was at a significant disadvantage because the MoD paid for storage, gas, electricity, sewerage, water and repairs, thus providing an effective subsidy not enjoyed by Rosyth, which has to meet these costs itself.
Last year the Fife dockyard lost out on three contracts - worth £35m - to refit HMS Lancaster, HMS Chatham and HMS Cornwall.
The NAO has since written to Mr Duguid acknowledging receipt of his letter demanding an inquiry but the MoD is yet to reply.
A spokesman for Babcocks said: "We welcome this announcement. It demonstrates the on-going commitment of Babcocks to Rosyth and underlines the importance of our drive to improve our competitiveness."
HMS Edinburgh is the largest of the Royal Navy's 12 Type 42 Destroyers and was launched in 1983 while HMS Walney is a Sandown class minesweeper which has been in service since 1992.