Hitachi on Thursday landed a £350m contract to help the government carry out tests on its high-speed West Coast Main Line replacement train, following a British jobs campaign at a factory near Newcastle.

The contract, which comes with the option of a further £200m and £40m, between 2019 and 2021, includes putting the rail infrastructure in place, supervising the testing period, and later providing maintenance and refurbishment, and will be won from Thursday through a joint venture between Hitachi Rail Europe and private London-based infrastructure investor First Group.

The decision, which follows a recommendation from the government’s railway board, means that the £50bn West Coast Main Line upgrade, touted as one of the fastest major rail infrastructure programmes in British history, will be completed on time by December 2021. It will also mean that the huge BAE Systems-Hitachi rail joint venture, called Hitachi Rail Innovation (HRII), will only be a new joint venture in this contract.

Following the completion of that programme, HRII will become an independent company controlled 50 per cent by BAE Systems with the remaining 49 per cent held by Hitachi. The four rail companies, which include Virgin Trains and Stagecoach, which have each purchased a quarter shareholding in HRII, will exit their tie-ups.

An earlier plan to award the contract to the Bombardier train business in Derby, and part of rail infrastructure investor Macquarie Capital, which had led the bidding, did not proceed after regulators questioned its viability.

The British government had to accept its decision not to award the contract in December after it failed to identify a partner to lead the bid. By this point, Bombardier had already lined up a rival bid with Germany’s Siemens, and the Department for Transport’s line was effectively closed.

Iain Watters, chief executive of HRII, described the deal as “transformational” for the company, describing it as “the biggest rail tender in Europe”. He said that without the contract, “HRII would have been forced to reduce services” and that his “ambitious plans for the future” would have to be renegotiated.

He added: “HRII will provide certainty for our employees, the vendors, suppliers and customers by creating a world-class business and supporting a unified rail network that can compete effectively in the global market.”

The contract will see Hitachi relocate its operations from Kings Lynn, Norfolk, to County Durham, as well as retain its existing fleet of 700 West Coast Main Line coaches.