MANILA — President Rodrigo Duterte of the Philippines has signed a landmark law aimed at giving expanded autonomy to Muslims in the south of the country, his spokesman said on Thursday, with the legislation expected to bring some measure of peace to a region choked by four decades of separatist violence.

The long-delayed law came four years after the government signed a peace deal with the separatist group, the Moro Islamic Liberation Front, which dropped its bid for full independence in return for the right to self-rule.

The front had fought a fierce uprising since 1978 that left about 120,000 people dead and pushed pockets of the deep south of the Philippines into a cycle of extreme poverty and violence.

The new legislation, called the Bangsamoro Organic Law, was supposed to have been passed early this week, but infighting among allies of Mr. Duterte in Congress delayed its passage. The president’s spokesman, Harry Roque, said on Thursday that the presidential palace had now received a copy of the law.