Shoosmiths has helped client Hitachi Rail Europe (HRE) secure a £4.5 billion contract to build and service new trains for the next 30 years.
The contract, approved by Transport Secretary Justine Greening, will create 900 jobs and secure thousands more.
HRE owns 70% of rail consortium Agility Trains, which will subcontract the building and servicing of 92 complete new trains to HRE.
Led by Chris McClure, partner and head of rail projects, a cross-discipline team from the national law firm advised HRE on various matters, including all arrangements, prime contracts and subcontracts.
Partner and corporate specialist Mark Shepherd provided advice on the equity aspects of the deal.
HRE will build new state-of-the-art train maintenance depots at London North Pole, Stoke Gifford and Swansea as part of the contract, and Shoosmiths partners Joanne McGuinness and Simon Wain advised on the property and construction issues respectively.
McClure said: "This has been - and will continue to be - a hugely important piece of work for us, for a very important and high-profile client.
"That we have reached this point in a long, demanding and complex process, is down to the sheer hard work, dedication and specialist knowledge that the Shoosmiths team has been able to bring to the table.
"The level of investment and commitment being demonstrated by our client is a massive boost to the UK economy, and we're proud and delighted to be playing a part in that.
"We've forged an excellent relationship with HRE, and helping it secure this contract can only enhance our already very good reputation in the big ticket rail projects arena."
DLA Piper acted for Agility Trains, while Freshfields advised the Secretary of State for Transport.
Agility Trains was awarded the contract under the Intercity Express Programme, the project to replace Britain's Intercity fleet.
The new HRE factory will be built at Newton Aycliffe, County Durham.
The first new trains are scheduled to start operating on the Great Western Main Line in 2017.