The Philippines’ president-elect, Rodrigo Duterte, has agreed to resume formal peace negotiations with Maoist-led rebels in Oslo starting in July, one of his senior advisers has said, after the talks stalled four years ago.

The Philippines began talks with the communist National Democratic Front in 1986 to resolve one of the world’s longest-running insurgencies, which has killed more than 40,000 people and stunted growth in the Philippines over almost 50 years.

Jesus Dureza, Duterte’s peace adviser, said the agreement came after two days of informal talks with Europe-based exiled rebel leaders in Norway.

“We will recommend the release of all political prisoners to Duterte once he assumes the presidency and both sides will work for an interim ceasefire to boost the formal resumption of peace talks in the third week of July in Oslo,” Dureza said.

The tough-talking Duterte formally takes office on 30 June. A former mayor of Davao city, he is the first president from the southern Philippines, where the rebellion has been fought, since the late 1960s.

Dureza said the two sides were “very optimistic” the talks would succeed after Duterte agreed to appoint to his cabinet two leftwing members supported by the rebels, with another two positions promised.

There was no immediate comment from the communist rebels.

Brokered by Norway, the peace talks stalled four years ago when President Benigno Aquino declined to free political prisoners, including members of the rebels’ negotiating team who had been arrested.

Renato Reyes, secretary general of the leftwing group Bayan (Nation), said his group hoped Duterte would approve the release of sick and elderly prisoners on humanitarian grounds.

More than 500 political prisoners are being held, including 19 members of the rebels’ negotiating team.

Duterte promised during the presidential election campaign to end all insurgencies in the Philippines, including a more violent conflict with Islamist rebels that has killed more than 120,000 people and displaced two million over the past 47 years.

Dureza said the resumption of peace talks would be formalised once Duterte took office. The two sides also agreed to adhere to all previous agreements and to discuss social and economic reforms, he said.