Mr. Martin was not reporting in Gaza at the time of his arrest but had come voluntarily to testify for a Palestinian man on trial in a Hamas military court, accused of collaborating with Israel. Mr. Martin, who has produced reports for the BBC, among others, was arrested in the courtroom and taken to jail.

Image Paul Martin, who has produced reports for the BBC, was arrested on Sunday. Credit... Israeli Government, via Reuters

Hamas said the Palestinian defendant, Mohammed Abu Muaileq, had made a confession that implicated Mr. Martin in having “violated Palestinian law and security in Gaza.”

A British Foreign Office spokeswoman in Jerusalem said Britain was “concerned about the situation” and was providing him with consular assistance. Consular staff members in Gaza had seen Mr. Martin, she said.

Mr. Abu Muaileq used to belong to a squad that fired rockets at Israel on behalf of the Abu Rish Brigades, an unruly offshoot of Fatah, the secularist rival of Hamas. Palestinians said that more recently he worked in computer maintenance and that he had been in contact with an Israeli who worked for the same company.

Mr. Martin is said to have been a frequent visitor to Gaza, and to have filmed a documentary that featured Mr. Abu Muaileq.