JERUSALEM - Less than two years into office, Prime Minister Benjamin Netanyahu's government collapsed Tuesday as he fired two ministers who lead key parties in his ruling coalition.

Ending a protracted political crisis and speculation about early elections, Netanyahu dismissed Justice Minister Tzipi Livni and Finance Minister Yair Lapid, who have repeatedly challenged his leadership.

"I will no longer tolerate an opposition within the government," Netanyahu said in announcing the changes. "I will not tolerate ministers attacking the policy and head of the government from within."

The statement from his office added that Netanyahu would call to dissolve the Knesset, Israel's 120-seat parliament, as soon as possible in order to "go to the voters and receive a clear mandate to lead Israel."

An opposition bill to dissolve the Knesset was already slated for discussion Wednesday and was expected to pass.

Preliminary approval then would start the clock ticking toward general elections, which have to be held within 90 days. The cabinet would remain in place until a new government is formed after elections.

The five-party coalition Netanyahu formed after the last elections in January 2013 was divided from the start on a wide range of issues, including the peace process with the Palestinians, settlements, and economic policies.

The latest deadlock was sparked by a controversial nationality bill, declaring Israel to be a Jewish state, and a budget that put Livni and Lapid on a collision course with Netanyahu, whose policies they openly criticized with increasing frequency and urgency.

Both issues erupted into a full-blown crisis as both ministers signaled they preferred elections to compromise. Netanyahu, for his part, demanded loyalty from his entire coalition and said daily threats of resignation and other political dictates made government work impossible.

A series of last-minute meetings Netanyahu held Monday and Tuesday failed to stop the downward spiral of his feuding government.

Fierce accusations flew after a late-night meeting between Netanyahu and Lapid. A late-night statement said that Netanyahu does not favor elections now but that this was better than "the continued existence of a Cabinet whose ministers sabotage the government's actions against the public interest."

Lapid, leader of the Yesh Atid party, accused Netanyahu of "acting irresponsibly" and reneging on promised guaranteed support for the budget and a flagship economic reform, both geared to lower the cost of living.

"We had an alternative, a good alternative," Lapid said, adding that billions will now be wasted on unnecessary elections rather than going to education, welfare, and health. The cost of elections is estimated at $500 million.

According to Livni, who chairs the liberal Hatnuah party, elections will not be about the economy but a choice between moderate Israeli Zionism and "dangerous extremists that mustn't be allowed to take over the country."

Livni, Israel's chief negotiator with the Palestinians, called for a more centrist government that would "fight terror but also make the necessary diplomatic decisions."