Madagascar President Hery Rajaonarimampianina meets with Chinese President Xi Jinping (not pictured) at the Great Hall of the People on March 27, 2017 in Beijing, China. REUTERS/Lintao Zhang/Pool *** Local Caption *** Hery Rajaonarimampianina

ANTANANARIVO (Reuters) - Madagascar’s president approved a new election law lifting a provision that would have prevented the main opposition candidate from standing for office, which had provoked a political crisis and deadly street demonstrations.

Supporters of opposition politician Marc Ravalomanana, who served as president from 2002 until he was toppled in a 2009 coup, have demanded the scrapping of election rules they said were drawn up to stop him from running. The High Court ruled last week that the rules were unconstitutional.

“Organic laws (on elections) were promulgated today on the basis of the decisions and opinions of the High Constitutional Court,” President Hery Rajaonarimampianina’s office said in a statement late on Friday.

Ravalomanana had been barred from standing for office because of a criminal conviction imposed while he was in exile after the coup. His supporters said that provision was intended to prevent him from returning to power in the election, which is due later this year on a date that has yet to be announced.

The High Court overturned the rule that would have prevented him from standing, and also removed provisions that had restricted media access. Candidates will be permitted to receive money from abroad, as long as it does not come from foreign governments.

Ravalomanana has teamed up in opposition with the man who succeeded him, Andy Rajoelina. At an opposition march last month against the laws, police fired teargas at demonstrators and two people later died from their injuries.

Madagascar is one of the world’s poorest countries, despite reserves of nickel, cobalt, gold, uranium and other minerals. The 2009 coup scared off foreign investors.