WASHINGTON — Secretary of State John Kerry tore into Israel on Wednesday for settlement-building, accusing Prime Minister Benjamin Netanyahu of dragging Israel away from democracy and forcefully rejecting the notion that America had abandoned Israel with a controversial U.N. vote. Netanyahu accused the Obama administration of a biased bid to blame Israel for failure to reach a peace deal.

In a farewell speech, Kerry laid out a two-state vision for peace that he won't be in office to implement, but that the U.S. hoped might be heeded even after President Barack Obama's term ends. He defended Obama's move last week to allow the U.N. Security Council to declare Israeli settlements illegal, the spark that set off an extraordinary and deepening diplomatic spat between the U.S. and its closest Mideast ally.

"If the choice is one state, Israel can either be Jewish or democratic, it cannot be both, and it won't ever really be at peace," Kerry said in a speech that ran more than an hour, a comprehensive airing of grievances that have built up in the Obama administration over eight years but were rarely, until this month, discussed publicly.

Netanyahu pushed back in a hastily arranged televised statement in which he suggested he was done with the Obama administration and ready to deal with President-elect Donald Trump, who has sided squarely with Israel. The Israeli leader faulted Kerry for obsessing over settlements while paying mere "lip service" to Palestinian attacks and incitement of violence.

"Israelis do not need to be lectured about the importance of peace by foreign leaders," Netanyahu said from Jerusalem.

The dueling recriminations marked a low point for U.S.-Israel relations, and a bitter end to eight years of frustrated ties between Obama and Netanyahu, who quarreled repeatedly over settlements, the peace process and Obama's nuclear deal with Iran.

Trump, who has assured Israel it merely needs to "hang on" until he takes over, told reporters that Kerry's speech spoke for itself. It was unclear whether Israel came up in a phone call Obama, while vacationing in Hawaii, placed to Trump on Wednesday morning.

Nor was it clear what impact Kerry's speech, coming in the final days of the administration, might have.

Netanyahu expressed concern that a French-hosted summit next month could lead to an international framework that the U.N. Security Council might then codify with Obama's assent, boxing Israel in. Yet Kerry seemed to rule out the possibility Obama would take more parting shots, such as promoting that type of U.N. resolution or recognizing Palestinian statehood.

The diplomatic fracas erupted last week when the U.S., in a departure from past policy, decided to abstain rather than veto a U.N. Security Council resolution calling Israeli settlements in the West Bank and east Jerusalem a violation of international law. Israel was incensed, and on Wednesday, Netanyahu claimed Israel has "absolute, indispensable evidence" the U.S. actually spearheaded the resolution.

Netanyahu offered what he called proof of U.S. collusion: a document, leaked to an Egyptian newspaper, that purports to be a Palestinian account of a December meeting between top U.S. and Palestinian officials. But White House spokesman Ned Price called it a "total fabrication" and added: "This meeting never occurred."

Palestinian President Mahmoud Abbas responded to the speech by reaffirming that he's ready to resume peace talks if Israel halts settlement construction.

Kerry, unveiling a six-part outline of what a future peace deal could look like, deviated from the traditional U.S. message that foreign powers shouldn't impose a solution. His outline tracked closely with principles long assumed to be part of an eventual deal, and Kerry insisted he was merely describing what's emerged as points of general agreement.

Though Kerry faulted Palestinian leaders for insufficiently condemning violence and terrorism against Israelis, most of his speech focused on Israel. He said the two-state solution, the basis for all serious peace talks for years, was "now in serious jeopardy," and called Netanyahu's' government "the most right-wing in Israel's history."

He invoked the widespread concern that the growing Arab population in Israel and the Palestinian territories will eventually make Jews a minority in Israel, creating a demographic crisis for Israel unless there's a separate Palestinian state.

"The settler agenda is defining the future of Israel. And their stated purpose is clear: They believe in one state," Kerry said.

The U.S, the Palestinians and most of the world oppose Israeli settlement construction in the West Bank and east Jerusalem, territories captured by Israel in 1967 and claimed by the Palestinians for an independent state. But Israel's government argues previous construction freezes failed to advance a peace deal and that the future of the settlements — now home to 600,000 Israelis — must be resolved in direct talks between Israelis and Palestinians.

While Israel's Arab population has citizenship rights, the roughly 2.5 million Palestinians living in the occupied West Bank do not. Israel has annexed east Jerusalem, where Palestinians have residency rights but few have citizenship, in a move not internationally recognized.

Kerry said a future deal would have to ensure secure borders for Israel and a Palestinian state formed in territories Israel captured in the 1967 Mideast war, with "mutually agreed, equivalent swaps." He said both countries must fully recognize each other, ensure access to religious sites and relinquish all other existing claims. Kerry also called for assistance to help Palestinian refugees.

Yet he offered fewer details about how to get to such a deal, given the failure of so many previous attempts, including his own nine-month effort that collapsed in 2014. He urged Israelis and Palestinians to take "realistic steps on the ground now" to begin separating themselves into two states.

Kerry reiterated that the Obama administration's commitment to Israel was as strong as that of previous presidents, but he also noted that previous U.S. administrations had also abstained on certain resolutions critical of Israel.