The first framework includes civil works, such as design, program management and construction services for underground cables, and has a maximum ceiling value of £500m for work planned over the next four years.

The company, in a joint venture, secured one of seven places for construction of new overhead lines for an initial four years.

The contract has a potential to extend for an additional four year period.

Under the third contract, the company will provide front end engineering and design for upgrade of UK’s gas transmission system, and will also upgrade compressor stations at Huntingdon and Peterborough.

Costain chief executive Andrew Wyllie said the frameworks compliments the company’s strategy of focusing on blue chip customers whose major spending plans are underpinned by strategic national needs.

"The awards also reflect the ongoing broadening of our service offering, in which we form long-term, strategic partnerships with our customers to deliver an increasingly multidisciplinary range of services across the full life cycle of their assets," Wyllie added.

Work under all three frameworks starts immediately.

National Grid is planning to invest up to £26bn between now and 2021 on upgrade and development of its gas and electricity networks.