The attack on a Michigan synagogue earlier this month was a "Hezbollah-inspired act of terrorism", federal officials have said.

The FBI on Monday said the accused assailant, Ayman Muhammad Ghazali, "purposely [targeted] the Jewish community and the largest Jewish temple in Michigan" and was "inspired by Hezbollah's militant ideology".

Ghazali, a naturalised US citizen from Lebanon, rammed his truck into Temple Israel in West Bloomfield on 12 March. Dozens of children were inside the synagogue at the time.

His recovered online activity showed repeated searches for pro-Hezbollah news channels and for queries on large gatherings of Israelis in Michigan, the FBI said in a news conference.

Ghazali died of a self-inflicted gunshot wound to the head during the attack, authorities said. No others were killed but a security guard was injured and multiple officers were treated for smoke inhalation.