Israel has launched air strikes against militant targets in the Gaza Strip, after rockets were fired from the territory towards Jerusalem.
The Hamas-run Palestinian health ministry in Gaza said 20 people, including children, had died in the strikes.
In Jerusalem, the rocket fire caused Israel's parliament to be evacuated as sirens sounded.
Tensions between Israel and the Palestinians spiralled in recent days.
Gaza's Hamas rulers had threatened to strike after hundreds of Palestinians were injured in clashes with Israeli police in Jerusalem on Monday.
Israel said it had killed at least three Hamas militants. "We have started, and I repeat started, to attack military targets in Gaza," Israeli military spokesman Lt Col Jonathan Conricus told reporters.
Hamas sources told the BBC a commander of the Izzedine al-Qassam Brigades, Mohammed Abdullah Fayyad, had been killed.
Israel's Prime Minister Benjamin Netanyahu said Hamas had "crossed a red line" and that Israel would respond "with great force".
US Secretary of State Antony Blinken said Hamas needed to end the rocket attacks "immediately", adding: "All sides need to de-escalate."
The past few days have seen the worst violence in Jerusalem for years, with more than 300 Palestinians wounded in confrontations with Israeli police outside the al-Aqsa mosque on Monday.
A planned march by Israeli nationalists which was due to pass through Muslim areas of East Jerusalem's Old City was called off over fears it could stoke unrest.
The Jerusalem Day event marks Israel's capture of East Jerusalem - home to the Old City and its holy sites - in 1967, and usually sees hundreds of flag-waving Israeli youth make their way through the Muslim Quarter via Damascus Gate, chanting and singing patriotic songs.
It is regarded by many Palestinians as a deliberate provocation. This year's march would also have taken place in the final days of the Islamic holy month of Ramadan.
The latest violence follows days of clashes between Palestinians and Israeli police in the nearby Sheikh Jarrah district of East Jerusalem, with the possible eviction of Palestinian families from their homes there by Jewish settlers a focal point for Palestinian anger.
Israel's Supreme Court had been due to hold a hearing in the long-running case on Monday, but the session was postponed because of the trouble.
Fears had mounted that it would be a tense day in Jerusalem and so it turned out. The confrontation started first thing in the morning.
As I passed the Old City walls beneath the glittering Dome of the Rock, heavily armed Israeli police had entered the compound and were firing volleys of stun grenades at Palestinians who were throwing stones and other objects at them. Ambulances screamed past ready to ferry away the wounded.
The site holy to Muslims and Jews lies at the core of the region's conflict.
Hundreds of Jewish activists had planned to go there in the morning, but were ultimately stopped by police. Muslim worshippers had stayed in al-Aqsa all night - ready, they said, to defend their mosque.
The city's surging tensions stem from several causes. Among them, the threatened eviction of several Palestinians families from their homes in East Jerusalem by Jewish settlers.
That case is now on hold for several weeks after Israel's government intervened. But despite the growing international calls for calm, today has seen more fuel poured on an already volatile mix.
What happened at the al-Aqsa mosque?
Israel's police force said thousands of Palestinians had barricaded themselves in the building overnight with stones and Molotov cocktails in anticipation of a confrontation during the Jerusalem Day Flag March, which was scheduled to start at about 16:00 (13:00 GMT).
Al-Aqsa Mosque: Hamas flags and stones as thousands prepare to prevent police, 'settlers' from 'storming' the compound. pic.twitter.com/yIvT8Eksra— Khaled Abu Toameh (@KhaledAbuToameh) May 10, 2021
Officers were ordered to enter the mosque compound to "repel the rioters using demonstration dispersal methods" on Monday morning after a police post was attacked and stones were thrown towards a nearby road, it added.
For over an hour, police fired stun grenades, rubber bullets and tear gas at Palestinians, who threw stones and other objects.
Video posted on social media showed crowds running for cover and some of the stun-grenade canisters landing inside the mosque.
The al-Aqsa mosque, the third holiest site in Islam, is located on a hilltop complex known by Muslims as the Haram al-Sharif (Noble Sanctuary) and by Jews as the Temple Mount. Jews revere it as the location of two Biblical Temples and it is the holiest site in Judaism.
During clashes outside the Old City walls, a car was pelted with stones before crashing into bollards and hitting a man.
Jerusalem, a short while ago: A Jewish man narrowly escapes lynching after his car is pelted with rocks. A policeman on the scene stops the violent mob. pic.twitter.com/OmkwkfGPQv— Israel Foreign Ministry (@IsraelMFA) May 10, 2021
The Palestinian Red Crescent said 305 Palestinians had been injured in the clashes, and that 228 had been taken to hospital for treatment. Seven of them are in a critical condition.
The Israeli police force said 21 officers had been injured and that three had required hospital treatment.
Mr Netanyahu defended the police. "This is a battle between tolerance and intolerance, between lawless violence and order," he said.
Palestinian Authority President Mahmoud Abbas condemned the Israeli actions.
"The Israeli occupation forces' brutal storming and assault on worshippers in the blessed al-Aqsa Mosque and its courtyards is a new challenge to the international community," spokesman Nabil Abu Rudeineh said.
Confrontations between Palestinians and Israelis were also reported in the northern Israeli city of Haifa, and near the West Bank city of Ramallah.
King Abdullah II of Jordan, which is the custodian of Jerusalem's Islamic and Christian holy sites, condemned "Israeli violations and escalatory practices at the blessed al-Aqsa mosque".
Jordan assumed custody of the sites when it occupied the West Bank and East Jerusalem in the 1948 Middle East war, and was allowed to continue the role after the areas fell to Israel in 1967.
The Quartet of Middle East negotiators - the US, the EU, Russia and the UN - has also expressed deep concern over the violence, urging all sides to show restraint.
Why is Jerusalem a flashpoint?
The city, with its sacred sites, is the most sensitive place of all in the decades-old conflict between Israel and the Palestinians.
Alongside its religious importance are national claims - Israel in effect annexed East Jerusalem and considers the entire city its capital, though this is not recognised by most other countries.
Palestinians claim the eastern half as the capital of a hoped-for state of their own.
The hilltop compound containing the al-Aqsa mosque and buttressed by the Jewish holy site of the Western Wall is especially sensitive, with both Israel and Palestinians wary of each other's intentions and activities there.
Israel says the current violence there was planned "well in advance" by Palestinian extremists, though a series of events has driven unrest in Jerusalem.
Palestinian anger fuelled in the past few days by the uncertain fate of the families in Sheikh Jarrah came after a month of escalating tensions in the city.
After Ramadan began in mid-April, clashes erupted nightly between police and Palestinians protesting against security barriers outside Damascus Gate, worsening after a march by ultra-nationalist Jewish extremists angry over assaults by Palestinians on ultra-Orthodox Jews.
Meanwhile rare Palestinian elections planned for this month were called off by Palestinian President Mahmoud Abbas, who blamed restrictions on Palestinian voting rights in East Jerusalem, in a move which further angered Palestinians. Critics suggested Mr Abbas feared a victory by Hamas.