BEIRUT, June 14 (Reuters) - Lebanon is likely to hold long-delayed elections in May 2018, ministers said on Wednesday, after the cabinet approved a new electoral law for legislative elections that has spared the country a major political crisis.

The law, agreed by the country's fractious parties this week, will create a proportional representation system for parliament and change the number of districts from which lawmakers are elected, among other things.

It will also extend parliament's term by almost a year until next May, avoiding a legislative vacuum when the chamber's current term ends on June 20.

"Today, cabinet approved the law ... with an extension of parliament's term by 11 months for technical reasons" to prepare for the polls under the new law, Prime Minister Saad al-Hariri said. The law must now be approved by parliament. Sectarian divisions have long plagued politics in Lebanon, exacerbated by the war in neighbouring Syria and complicated by regional rivalry between Iran and Saudi Arabia, who back different groups in the country.

Those divisions have kept Lebanon from holding any legislative elections since 2009. Consequently, lawmakers have already extended their own mandate twice. Parliamentary terms are supposed to be four years.

Protesters took to the streets of Beirut after the two previous extensions, which critics, including the European Union, condemned as unconstitutional.

Recent disputes over the election law, at the heart of the nation's sectarian political system, had pushed Lebanon to the brink of a new crisis, threatening to leave it without a parliament for the first time.

Polls now are likely to take place on May 6, 2018 and parliament could extend its term until May 20, Information Minister Melhem Riachy told journalists on Wednesday.

(Reporting by Lisa Barrington, Issam Abdallah and Ellen Francis, editing by Larry King) ((lisa.barrington@thomsonreuters.com))