TEL AVIV, Israel >> The Israeli police and emergency services said Tuesday that at least six people were killed and 12 more were injured when two gunmen opened fire on a light-rail train in Tel Aviv.

The police called the attack an act of terrorism and said the gunmen were killed on the scene. No group immediately claimed responsibility for the shooting.

Shortly after the attack, Israel’s air defense system intercepted a swarm of missiles over Tel Aviv. Loud booms and bright explosions filled the sky.

“The police forces are handling the scene under a missile attack,” the police said in a statement about the shooting.

“The event is under control.”

The shooting took place a day after Israel invaded Lebanon after a series of punishing strikes on Hezbollah, the armed Lebanese militia and proxy to Iran.

Haim Sargarov, the police commander of the Tel Aviv district, told reporters that the attackers were “not Israelis.” The police in Israel almost exclusively use the word “terrorism” to describe attacks carried out by Palestinian militants.

The shooting occurred on Jerusalem Boulevard, a major tree-lined thoroughfare and important public transportation route in the city’s Jaffa neighborhood. Israel’s emergency service agency, Magen David Adom, said it was treating the injured.

Nadav Matzner, a spokesperson for the group, said six of the 12 people who were injured in the attack were severely wounded.

Images broadcast on Israeli television showed two gunmen in street clothes carrying large rifles.

Video shared widely online showed injured people lying on the sidewalk on Jerusalem Boulevard.

Videos verified by The New York Times showed the aftermath of the shooting at the Ehrlich light rail station in Jaffa. Three motionless bodies were seen lying on the street. Two armed men were captured earlier in surveillance footage exiting a train at the station.

Recent incidents have brought Israel’s conflicts creeping ever closer to Tel Aviv, a city that often feels physically and psychologically removed from the violence.

The shooting came after several attempted aerial attacks on Tel Aviv by Iran-backed forces in Lebanon and Yemen, and six weeks after Hamas and Islamic Jihad took responsibility for what the groups said was a suicide bombing in Tel Aviv.

The Israeli police did not describe that incident as a suicide bombing, but if it were, it would have been the first suicide attack in the city since 2016. At that time, Hamas and Islamic Jihad had threatened attacks in response to the “continued civilian displacement and killings” of Palestinians.

The shooting Tuesday took place shortly after Tel Aviv residents were advised by Israel’s Home Front Command to stay close to bomb shelters and to avoid any unnecessary travel or any outdoor activities.

The streets of the city were quickly emptied in anticipation of the Iranian strike.