COLOMBO (Reuters) - Sri Lanka's parliament approved a law on Thursday to attract investment in renewable energy and reduce losses in its state-run power monopoly - measures it had committed to in a $2.9 billion IMF programme.

The 225 lawmakers approved the new legislation with a majority of 44 votes, Speaker Mahinda Abeywardena said.

Power and Energy Minister Kanchana Wijesekera told parliament the Electricity Bill would make the Ceylon Electricity Board (CEB) monopoly more profitable and attract investment to the renewables sector.

"Sri Lanka has set a target of generating 70% of its power via renewables by 2030. It is estimated that in the next six years Sri Lanka will need $12 billion to meet this goal. So we need to open the sector to attract this investment," he said.

Sri Lanka is struggling to emerge from a two-year financial crisis in which its dollar reserves plunged to record lows and the economy contracted by 2.3% last year.

As part of a $2.9 billion program with the International Monetary Fund (IMF), it agreed to reform its state-owned companies to make them profitable. This included unbundling the CEB so that transmission, generation and other services would be run as separate entities.

Opposition parties and trade unions opposed the new legislation, arguing that it gives more power to the minister and opens the door to privatisation.

A three-year reform timeline under the new law will also enable Sri Lanka to set up wholesale power markets, open access, and engage in power trading across south Asia, Wijesekera said.

Sri Lanka entered into a 20-year power purchase agreement with India's Adani Green Energy Ltd last month for two wind power stations being built by the company at a cost of $442 million. Sri Lanka has discussed grid connectivity and plans to attract investment from India for its renewable sector, aiming eventually to export power to its giant neighbour.

(Reporting by Uditha Jayasinghe)

By Uditha Jayasinghe