1 of 3
Khalil Senosi, Associated Press
South Sudan rebel leader Riek Machar addresses journalists during a news conference in Nairobi, Kenya , Wednesday, July 8, 2015. Machar called on South Sudan President Salva Kiir to resign along with the whole government or risk sparking a revolution

NAIROBI, Kenya — A South Sudan rebel leader Wednesday called on President Salva Kiir to resign along with all ministers and the parliament or risk sparking a revolution.

Kiir's term in office and that of the legislature expires at midnight according to terms of the transitional constitution adopted in 2011, Riek Machar said.

If Kiir refuses to resign, citizens have the right to overthrow his government, Machar said.

Machar also asked the international community withdraw its support for Kiir's government.

Machar's remarks come ahead of Thursday's independence day celebration, and throw the international backed mediation process between the two leaders into further disarray.

Machar said a three year extension of Kiir's term in office granted by parliament in March is the not legal because parliament did not have the right to amend the constitution.

Fighting broke out in the world's newest nation in December, 2013 after Kiir, an ethnic Dinka, accused Machar, an ethnic Nuer, of trying to oust him in a coup. That sparked months of ethnic attacks and the violence has continued despite several cease-fires.

Kenya's President Uhuru Kenyatta, who is also chairman of the East African Community regional body, has attempted to mediate a peace deal between and Kiir and Machar but those efforts appear to have flopped.

The U.N. Security Council last week imposed travel bans and asset freezes on six generals from both the government and rebel sides.

But the sanctions do not touch Kiir or Machar, former political allies who fell out amid a power struggle within South Sudan's ruling party.

After a decades-long fight for independence, South Sudan peacefully broke away from Sudan in 2011. It has been plagued by corruption, ethnic tension and a power struggle within the ruling party.