BEIRUT — An American freelance journalist detained by Lebanese authorities on suspicion of sending footage of anti-government protests to an Israeli news outlet was released Tuesday, according to friends and advocacy groups.

Nicholas Frakes, 24, was taken into custody on Sunday during violent clashes in downtown Beirut between police and protesters. In a text message sent shortly after his release, he said he is happy to be free and is looking forward to “getting back to reporting the news.”

The Lebanese authorities had accused Frakes of live-streaming footage of the demonstrations to the Israeli news outlet Haaretz, in violation of Lebanese laws forbidding interaction with Israel, an enemy state. Haaretz issued a statement saying it had had no contact with Frakes and had been using footage supplied by the international news agency Reuters.

According to a statement from the General Security Directorate, security officials had pinpointed the location of the live stream depicting the Beirut clashes and found Frakes at the scene.

Friends and journalism advocacy groups said they believed the detention was the result of a misunderstanding about the way international news outlets operate. Reuters said it had provided the footage, which any of its clients worldwide could use.

“We are very happy he has been freed,” said Ignacio Miguel Delgado Culebras, representative for the Middle East and North Africa with the Committee to Protect Journalists.

The detention came amid heightened tensions in Lebanon, with anger at the failure of the political elites to resolve the country’s acute political and financial crisis boiling over into violence during the weekend.