MANILA (Reuters) - The Philippines moved a step closer on Wednesday to ending decades of conflict on its resource-rich island of Mindanao, after lawmakers approved a bill that will eventually allow self-rule for the country’s Muslim minority.

FILE PHOTO: Residents who returned from evacuation centers walk past a bullet-ridden house believed to have been rented by pro-Islamic State militant group leaders Isnilon Hapilon and Omar Maute before their attack on the region, in Basak, Malutlut district in Marawi city, Philippines October 29, 2017. REUTERS/Romeo Ranoco/File Photo

Lower house lawmakers voted 227 to 11, with 2 abstentions, to pass the Bangsamoro Basic Law (BBL), seen as key to forging lasting peace with separatist rebels and thwarting the rise of Islamist extremism in the nation’s poorest and most dangerous region.

The bill is the result of a 2014 peace deal between the Moro Islamic Liberation Front (MILF) and the government to end nearly 50 years of conflict that has killed more than 120,000 people and displaced 2 million.

(Philippine peace deal: tmsnrt.rs/2vcN12N)

It outlines the process to set up a self-administered territory in an area sometimes referred to as Bangsamoro (nation of Moros), encompassing mountains, islands and jungles that is home to at least 4 million people, mostly Muslim.

President Rodrigo Duterte, who was the mayor of a city on the southern island for 22 years, has stressed the importance of getting the legislation passed and certified it as an urgent bill on Tuesday to get it approved before a house recess on June 2.

The 22-member Senate has committed to Duterte to pass its counterpart version soon, before a panel of both houses combines both drafts in a version for the president’s final approval.

The previous administration met numerous hurdles and failed to pass the bill, fuelling resentment and mistrust among many minority Muslims.

Duterte has warned that another failure could be disastrous and play into the hands of extremist groups like Islamic State, which inspired a militant alliance to seize Marawi City last year for five months.

The battle for Marawi was the biggest the Philippines has seen since World War Two and stoked wider concerns that Islamic State had ambitions to turn Mindanao into a base for its operations in Southeast Asia.

Hundreds of people were killed in Marawi, more than 350,000 were displaced and half the city was left in ruins. Martial law is still in force across Mindanao.

Though some militants who fought in Marawi were former MILF members, the group has denounced radical Islam and has a good relationship with Duterte.

Mindanao, an island the size of South Korea, is the Philippines’ most underdeveloped region, but is home to most of its nickel mines and biggest fruit farms, besides vast tracts of land the government wants to convert into palm oil plantations.

But its notorious clan wars, lawlessness and conflicts with Muslim and communist rebel groups have kept investors at bay.

Once signed into law, Bangsamoro will have its own executive, legislature and fiscal powers, but the central government will continue to oversee defense, security, foreign affairs, and monetary policy.