JERUSALEM — Israel, confronting a host of contentious political and military issues, was struck by a wave of national euphoria this weekend after the country’s contestant won the Eurovision Song Contest on Saturday night with a defiant anthem about female empowerment.

Never mind the preparations for the controversial opening on Monday of the United States Embassy in Jerusalem, the drama surrounding stolen Iranian nuclear archives or the Israeli strikes on Iranian military targets inside Syria. Many Israelis stayed up till nearly 2 a.m. Sunday to watch the nail-biting finish of the annual international pop competition, which took place in the Portuguese capital, Lisbon.

The win by Netta Barzilai for her #MeToo-themed hit, “Toy,” seemed to ease, at least for now, deep-seated Israeli fears of cultural boycott and isolation. When the votes came in from around the world and Ms. Barzilai’s performance beat songs by rivals from nations like Austria, Cyprus and Sweden, many Israelis hailed it as a diplomatic victory and national vindication.

Prime Minister Benjamin Netanyahu was among the first to get in on the celebrations, echoing Ms. Barzilai’s words as he exulted on his Facebook page: “Next year in Jerusalem!”