Palestinians claim the eastern half of Jerusalem as the capital of a hoped-for state of their own.
The fighting between Israel and Hamas was triggered by days of escalating clashes between Palestinians and Israeli police at a holy hilltop compound in East Jerusalem.
The site is revered by both Muslims, who call it the Haram al-Sharif (Noble Sanctuary), and Jews, for whom it is known as the Temple Mount. Hamas demanded Israel remove police from there and the nearby predominantly Arab district of Sheikh Jarrah, where Palestinian families face eviction by Jewish settlers. Hamas launched rockets when its ultimatum went unheeded.
Palestinian anger had already been stoked by weeks of rising tension in East Jerusalem, inflamed by a series of confrontations with police since the start of Ramadan in mid-April.
It was further fuelled by Israel’s annual celebration of its capture of East Jerusalem in the 1967 Middle East war, known as Jerusalem Day.
The fate of the city, with its deep religious and national significance to both sides, lies at the heart of the decades-old Israel-Palestinian conflict. Israel in effect annexed East Jerusalem in 1980 and considers the entire city its capital, though this is not recognised by the vast majority of other countries.