Riyadh has a fractious relationship with the Palestinian movement, which is sponsored by Saudi Arabia's enemy Iran, and Hamas has no official representation in the kingdom.

Despite Khoudary's long working relationship with the Saudi authorities, he has been detained since April, when he was arrested in the Red Sea city of Jeddah, according to a Hamas statement.

Khoudary's eldest son Hani has also been detained, the statement said, without revealing when exactly he was arrested.

Hamas said that for five and a half months it has attempted to secure their release through “diplomatic talks” conducted via mediators - with zero results.

Middle East Eye understands that the Khoudarys are being investigated and held in an official prison, and have not faced any charges or met with lawyers or a state prosecutor.

'A palace decision'

Adnan Abu Aamer, a political analyst close to Hamas, told Middle East Eye that the Khoudarys' exact whereabouts remain “unknown”.

“Khaled Mishal, a Hamas leader who has channels with Saudi princes, officials and ministers, asked where the Khoudarys are being detained and for how long, but he has not received details,” said Abu Aamer, who is also the president of the political science department in Al-Ummah University in the Hamas-run Gaza Strip.

He said that within Hamas circles in Gaza there is a “general feeling” that the arrest was “a palace decision”.

'Everything he did was with an official agreement, and under the eyes of the state'

- Adnan Abu Aamer, political analyst

“It is not an ad hoc order taken by a security officer," Abu Aamer said, likening Khoudary to an airplane's black box.

"He has information about the movement, including its financial activities," he said.

For two decades Khoudary has had a prominent role in the Saudi capital, arranging Hajj and Umrah trips for Hamas officials, holding talks with ministers and meeting top Saudi figures, including kings.

“He is a traditional figure of Hamas in Saudi Arabia. He is highly regarded, and he coordinated visits and talks between the movement and the kingdom," Abu Aamer said.

"Everything he did was with an official agreement, and under the eyes of the state."

Translation: A picture showing King Abdullah and [Hamas' spiritual leader] Sheikh Ahmed Yassin, and Dr Mohammed Khoudary, in a unique meeting while Yassin performed Hajj in 1998. Sheikh Yassin recieved a special invitation from the Saudi crown prince.

Hamas said its call to release Khoudary was based on humanitarian grounds, referring to his deteriorating health in prison and his age.

According to the movement, Hani - Khoudary's son - was arrested as part of a campaign aimed at people accused of sympathising with Hamas, declaring the faction's nemesis Israel as an enemy on social media, or endorsing Palestinian resistance.