The United Nations voted overwhelmingly Thursday to recognize a Palestinian state, a long-sought victory for the Palestinians but an embarrassing diplomatic defeat for the United States.

Canada joined the U-S in voting against the motion, on the grounds it could delay hopes of achieving an independent Palestinian state through peace talks with Israel.

The resolution upgrading the Palestinians’ status to a nonmember observer state at the United Nations was approved by a more than two-thirds majority of the 193-member world body a vote of 138-9, with 41 abstentions.

A Palestinian flag was quickly unfurled on the floor of the General Assembly, behind the Palestinian delegation.

Real independence, however, remains an elusive dream until the Palestinians negotiate a peace deal with the Israelis, who warned that the General Assembly action will only delay a lasting solution. Israel still controls the West Bank, east Jerusalem and access to Gaza, and it accused the Palestinians of bypassing negotiations with the campaign to upgrade their U.N. status.

The United States immediately criticized the historic vote. “Today’s unfortunate and counterproductive resolution places further obstacles in the path peace,’” U.N. Ambassador Susan Rice said.

Israeli Prime Minister Benjamin Netanyahu called the speech by Palestinian President Mahmoud Abbas to the General Assembly shortly before the vote “defamatory and venomous,” saying it was “full of mendacious propaganda’” against Israel.

Abbas had told the General Assembly that it was “being asked today to issue the birth certificate of Palestine.” Abbas said the vote is the last chance to save the two-state solution.

After the vote, Netanyahu said the UN move violated past agreements between Israel and the Palestinians and that Israel would act accordingly, without elaborating what steps it might take.