MANILA — The Philippine government and the country’s largest Muslim insurgency group negotiated the final details of a peace accord on Saturday that many hope will end more than 40 years of violence that has killed tens of thousands of people and helped nurture Islamic extremism in Southeast Asia.

The agreement will create an autonomous Muslim-dominated region in the restive south of the predominantly Christian country, handing much of the responsibility for security there to local authorities as well as a large share of revenues from the region’s wealth of natural resources. The militants have agreed to disarm, with many expected to join Philippine security forces.

Although many challenges to sustained peace remain — notably that some militant groups have refused to join the agreement — the deal with the Moro Islamic Liberation Front is considered a signature achievement for President Benigno S. Aquino III. Mr. Aquino has vowed to end the conflicts on the island of Mindanao that have bedeviled the Philippines for more than a century and that would eventually hinder the nation’s ability to expand its economy and catch up with more prosperous neighbors.

“The agreement represents the culmination of decades of excruciating diplomatic efforts aimed at ending the conflict in Mindanao,” said Richard Javad Heydarian, a political science lecturer at Ateneo de Manila University. “This provides an unprecedented opportunity to end one of the world’s longest-running intrastate conflicts.”