GOTHENBURG, Sweden — The Swedish police arrested three people on Sunday after a masked gang hurled Molotov cocktails at a synagogue in the port city of Gothenburg as it hosted an event on Saturday night.

The attack set the yard ablaze, but the building did not catch fire and no one was injured. The authorities said the people gathered on the premises had fled to safety in the basement.

A police spokeswoman, Ulla Brehm, said: “It might become a hate crime. The crime is attempted arson. But that may change during the investigation.”

The Police Authority’s commissioner, Dan Eliasson, told the Aftonbladet newspaper that the threat level against Jewish interests in Sweden had increased since President Trump’s announcement that the United States would recognize Jerusalem as the capital of Israel.