Lebanese soldiers patrol the area near the US embassy in Awkar, Lebanon, on June 5, 2024.

Beirut: A Syrian man was arrested after a shooting Wednesday near the US embassy in Beirut, the Lebanese army said, with the diplomatic mission saying its personnel were safe.

The embassy, in the northern suburb of Awkar, "was subjected to gunfire by a person holding Syrian nationality", the army said in a statement on X, formerly Twitter.

"Army personnel deployed in the area responded to the sources of fire, wounding the shooter," the statement said, adding that "he was arrested and transported to hospital".

The judicial official told AFP that the assailant, who was wounded seriously, said he carried out the attack "in support of Gaza", where Israel and Hamas have been at war since the Palestinian militant group's unprecedented October 7 attack on Israel.

The shooter's brother, who lives in Lebanon's Bekaa valley in the country's east, was also detained, the official added, requesting anonymity as they were not authorised to speak to the media.

In a separate statement, the embassy said it would remain closed to the public for the rest of the day "but plans to be open for general business as usual" on Thursday.

The army said it was investigating the incident.

The US embassy said that "at 8:34 am local time small arms fire was reported in the vicinity of the entrance" to the high-security mission.

"Thanks to the quick reaction" of the Lebanese army, security forces "and our Embassy security team, our facility and our team are safe" it said on X.

It added that "investigations are underway and we are in close contact with host country law enforcement".

In September last year, a gunman opened fire at the US embassy, without causing casualties.

Lebanese police alleged the shooter was a delivery driver seeking revenge for his perceived humiliation by security personnel.

That shooting coincided with the anniversary of a deadly 1984 car bombing outside the US embassy annex in Beirut, which the United States blamed on the Iran-backed Hezbollah.

US diplomatic and military missions in Lebanon were attacked on a number of occasions during the 1975-1990 civil war, when Islamic fundamentalists also took several US hostages.

The embassy relocated to Awkar after it was struck by a suicide attack in April 1983 that killed 63 people.