NSW and Victoria will share a $6 billion "bonanza" from the sale of the iconic Snowy Hydro project in a deal that will pour new money into road and rail projects.

Prime Minister Malcolm Turnbull sealed the agreement with the two states late on Thursday to buy their stakes in the iconic scheme, clearing the way for a dramatic $4.5 billion expansion that promises more reliable power for the east coast electricity grid.

While the proceeds must be spent on “productive infrastructure” that boosts the economy, there will be no conditions placed on the specific projects that are funded by the proceeds, leaving Victorian Premier Daniel Andrews and NSW Premier Gladys Berejiklian with full scope to fast-track existing projects with the help of the new cash.

NSW will receive $4.154 billion and Victoria will get $2.077 billion, reflecting their respective Snowy shareholdings after allowing for the company’s debt.