MANILA (Reuters) - Philippine President-elect Rodrigo Duterte has agreed to resume formal peace negotiations with Maoist-led rebels in Oslo next month, one of Duterte's senior advisers said on Thursday, 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 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 told reporters.

The tough-talking Duterte formally takes office on June 30. 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 left-wing 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 outgoing President Benigno Aquino declined to free political prisoners, including members of the rebels' negotiating team who had been arrested.

Renato Reyes, secretary-general of left-wing 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 2 million over the past 47 years.

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

(Reporting by Manuel Mogato; Editing by Paul Tait)