BARCELONA, Spain — South Sudan's parliament on Thursday approved extending President Salva Kiir's term until 2021, angering the armed opposition and threatening already fragile peace talks in a five-year civil war.

The president is expected to sign the extension Thursday or Friday after parliament met in extraordinary session, lawmaker Atem Garang told The Associated Press. Elections have been delayed amid the fighting that has killed tens of thousands and set off Africa's largest refugee crisis since the 1994 Rwanda genocide.

"The government had to extend the term until there's peace. We can't leave the country without a government," Garang said.

Opposition spokesman Mabior Garang told the AP that "we regret the move as it shows the regime is playing games at the negotiating table." He called on the international community not to recognize the president's extended term.

The extension comes days after South Sudan's government said the government and opposition had agreed to reinstate opposition leader Riek Machar as first vice president. The opposition quickly denied it, however, and a final peace deal has not been signed.

The peace talks began last month as both sides faced the threat of United Nations and regional sanctions.

Kiir and Machar, meeting face-to-face for the first time in almost two years, agreed on a "permanent" cease-fire that began June 30 and, like past cease-fires, was violated within hours.

Both sides have been accused of abuses during the civil war that broke out in late 2013, two years after independence from Sudan. In the latest snapshot of atrocities, a U.N. report this week said government troops and allied fighters killed at least 232 civilians in a five-week period this year, hanging some people from trees and burning others alive, while at least 120 women and girls were raped or gang-raped.