Philippine President Benigno Aquino signed a peace deal Monday with Muslim guerrillas after deadly attacks underscored the obstacles to ending a 40-year insurgency that has blocked investment in the country’s mineral-rich south.

About 200 members of the rebel group Moro Islamic Liberation Front led by Chairman Al Haj Murad Ebrahim traveled to Manila to witness the signing. In the past week, suspected rebel attacks in the south killed at least five people, including three soldiers.

“We commit to peace,” Aquino said as he stood alongside Malaysian Prime Minister Najib Razak, who helped broker the talks. “Much work needs to be done to fully reap the fruits of this framework agreement.”

The new accord provides the best chance since 2008 to quell a rebellion that has killed as many as 200,000 and blocked companies from tapping mineral deposits worth an estimated $312 billion. Aquino is pushing to end death squads, clan wars and kidnappings by al-Qaida-affiliated militants as he pursues an investment-grade credit rating and faster economic growth.

“Achieving a lasting peace will take time and cannot happen overnight,” said Euben Paracuelles, a Singapore-based economist at Nomura Holdings. “The peace pact is a crucial step that changes perception on Mindanao and adds to the positive sentiment on the Philippines.”

The Philippines is targeting $1 billion of investments in the southern island of Mindanao following the peace agreement, Board of Investments head Cristino Panlilio said Monday. The government has been talking with at least five Asian and European companies planning to invest in the nation’s palm oil, mango, pineapple and banana industries, he said.

Other militant groups such as Communist insurgents in the New People’s Army may yet pose a risk for companies in the area. Earlier this year it claimed responsibility for 600 attacks since 2010, including against Xstrata Plc, the world’s fourth- biggest copper miner, and Sumitomo Metal Mining Co., Japan’s biggest nickel producer.

“This is a victory earned not by war, but by a collective desire to restore justice and peace to a troubled land,” Ebrahim said Monday. “After almost 16 years of hard negotiations and confrontations on the ground we have inked the most important document in the chapter of our history.”

Ebrahim and Aquino exchanged gifts earlier Monday. About 500 people who traveled from Mindanao held a peace vigil overnight outside the palace, organizers said.

“In confronting their differences and finding common ground, both sides have given something,” Najib said. “But the people of the Southern Philippines have gained everything.”

The police raised the nation’s security to full alert last week after it received an intelligence report that disgruntled Muslim rebels may have been behind the recent attacks.

Two days ago, three soldiers were shot and killed in the southern province of Basilan, according to the military, while police seized firearms, explosives and ammunition in a raid on a mining site in nearby Zamboanga del Sur. Two people were killed after a bomb exploded in Cagayan de Oro City, also in the nation’s south, on Thursday, which authorities said may be connected to blasts in Zamboanga province the previous day.

The peace accord under Aquino provides a road map for a political entity called the Bangsamoro that will replace the failed Autonomous Region in Muslim Mindanao, or ARMM, set up in 1989. The 11,000-strong Moro Islamic Liberation Front, or MILF, must abandon its pursuit of a separate state in return for more power, revenue and territory under a bill that needs to be passed by Congress and approved by a local referendum.

Catholic settlers outnumber the Muslim population by about five-to-one in Mindanao, home to about a quarter of the country’s 100 million people. About a third of Mindanao’s people said they had nothing to eat for at least one day in the three months to August, the highest rate among the nation’s three main regions, according to a survey by Manila-based polling company Social Weather Stations released Oct. 1.

The al-Qaida-linked Abu Sayyaf may be responsible for Saturday’s attack in Basilan to “agitate” the military and disrupt security, Captain Alberto Caber, spokesman for the 1st infantry division based in Lambangan, Zamboanga del Sur province, said by phone.

“There are groups that are not comfortable with the framework agreement and this means the problem will go on and on,” Rommel Banlaoi, executive director of the Philippine Institute for Peace, Violence and Terrorism Research in Manila, said in a telephone interview.

In 2008, after the Supreme Court in August 2008 ordered an injunction on a draft agreement between the government of ex- President Gloria Arroyo and the MILF that would have created a Muslim homeland, fighting between troops and renegade rebels forced about 390,000 Mindanao residents from their homes and left 100 civilians dead. The court declared the accord unconstitutional two months later.

Nur Misuari, chairman of the Moro National Liberation Front a splinter rebel group, told DZMM radio Monday that MILF members were traitors for agreeing to lay down their arms while saying he wouldn’t start a war in the southern Philippines. He called the peace deal a conspiracy between the Philippines and Malaysia so the latter can keep Sabah and Sarawak, which he said belonged to his great grandfather.