TUNIS —
Tunisia's Islamist-led government on Saturday agreed to resign after negotiations that could start next week with secular opponents to form a caretaker administration and prepare for new elections.

The talks aim to end weeks of crisis involving the Islamist-led coalition government and secular opposition parties that threatened to derail the transition to democracy in the North African country where the Arab Spring uprisings began in 2011.

Tunisia's powerful UGTT labor union, mediating between the two sides, proposed the ruling Islamist Ennahda party agree to three weeks of negotiations, after which it would step down and make way for an independent transitional administration and set a date for parliamentary and presidential elections.

"The dialogue will start on Monday or Tuesday," Lotfi Zitoun, an Ennahda party official, said. "Ennahda has accepted the plan without conditions to get the country out of the political crisis."

The UGTT confirmed the agreement and called on both sides to set a time to begin talks next week.

Since autocrat Zine al-Abidine Ben Ali was ousted in 2011 after street protests against his rule, Tunisia has struggled with divisions over the political role of Islam. The opposition accuses Ennahda of imposing an Islamist agenda on one of the Muslim world's most secular nations.

Tunisia's path to transition, however, has been mostly peaceful compared to Egypt, where the army toppled an elected Islamist president, and Libya, where the central government is struggling to curb rival militia influence.

The political crisis erupted in July after the killing of an opposition leader by suspected Islamist militants, bringing the opposition on to the streets to demand Ennahda step down.

After weeks of political deadlock, the talks could struggle to get past differences over a final draft of the new constitution, an electoral law to guarantee a transparent vote and a date for the elections.