MANILA (Reuters) - Seventeen captured communist guerrilla leaders in the Philippines, granted bail by the courts to attend peace talks next week in Norway, promised on Friday to return home after the five-day negotiations rather than flee.

President Rodrigo Duterte, who came to power seven weeks ago, is seeking to negotiate an end to two long-running insurgencies by Muslims and communists. Security forces feared rebels could take advantage of the talks to stay overseas or rebuild their guerrilla army.

"We will return home after the peace talks in Oslo," Benito Tiamzon, the highest ranking leader of the Communist Party of the Philippines, told a news conference hours after he and his wife, Wilma, were freed from a police prison house.

"We were released from jail to take part in the peace talks and we are serious about it," he added. "The negotiations in Oslo are only one part of the process and there are other talks happening in other venues."

Five rebel leaders still in detention hope to join the 17 traveling to Oslo for the talks. All have been in prison for several years. More than 500 political prisoners are still in detention, Muslim rebel leaders among them.

Hours after the government set free two top Communist Party leaders, the Maoist-led New People's Army, the military arm of the rebel movement, declared a seven-day unilateral ceasefire as a sign of goodwill.

50 YEARS OF CONFLICT

Jorge Madlos, a rebel spokesman, said all guerrilla units would cease offensive actions against military targets on Sunday morning until Saturday night to give way to talks scheduled to start on Monday.

Talks brokered by Norway between the government and the Maoist-led rebels' National Democratic Front stalled in 2012 over the government's refusal to free communist leaders who had been in jail for decades.

In 1987, the founder of the communist party, Jose Maria Sison, went to the Netherlands months after being freed from nine years of detention, but never returned. He sought asylum in Utrecht and has lived there for nearly 30 years.

"This is the first and only time we have a president determined to push genuine reforms," said Tiamzon, adding that this gave the communists confidence that current talks have better prospects to end nearly 50 years of conflict that has killed more than 40,000 people.

He said the two sides hoped to negotiate a ceasefire in talks, which begin on Monday, and will discuss political, economic and constitutional reforms, among other issues.