A United Nations official has called on Turkey to release all jailed journalists, saying their detentions were not commensurate with the government's needs to protect public safety.

Speaking to reporters Friday at the end of a weeklong visit to Turkey, David Kaye, the U.N. special rapporteur on the right to freedom of opinion and expression, said he understood the Turkish government's need to take measures to counter terror threats and protect its citizens.

Kaye added, however: "That does not mean that the government has a blank check to do whatever it wants to restrict freedom of expression."

Turkey has arrested close to 37,000 people since a failed coup attempt in July and dismissed or suspended more than 100,000 others.

Kaye said some 155 journalists are in detention.