The NSW government has received the green light to partially privatise the NSW electricity network after the upper house of the NSW parliament passed legislation on Wednesday night.

Premier Mike Baird, who was in the upper house for the vote, declared it a "milestone" in the history of the state.

Premier Mike Baird. Credit:Daniel Munoz

The Legislative Council pass two privatisation bills by 19 votes to 17 at about 10.30pm on Wednesday.

"I am delighted that, a few minutes ago, the Legislative Council passed the bills to enable a 99-year lease of 49 per cent of the poles and wires," Mr Baird said.