But American officials have appeared powerless to secure their release, and it has become increasingly clear that the detainees are potential bargaining chips in a long-running effort by Turkey to force the American government to extradite Mr. Gulen.
Mr. Erdogan himself seemed to confirm the suspicion last month, when he told a gathering of police officers in Ankara that he would hand over an American pastor, Andrew Brunson, once the United States gave him Mr. Gulen.
“They say, ‘Give us this certain pastor,’ ” he said, recounting his meeting with American officials. “You have another pastor in your hands; give him to us,” he railed.
If Mr. Gulen were handed over, the president said, he would sort out Mr. Brunson’s judicial case. “Give him to us and we will put yours through the judiciary; we will give him to you,” Mr. Erdogan said.
At the same time, Turkish officials have repeatedly insisted that the detainees are charged with serious crimes of terrorism and trying to overthrow the state, and that if they are not guilty, the courts will release them in due course.
A presidential aide said in a recent interview that the government had been surprised by the scale of the Gulen network, and believed it had infiltrated nearly every major institution of power. The aide added that the authorities now faced an enormous task to dismantle it. He spoke on the condition of anonymity in keeping with the protocol of his position.
More than 50,000 Turks have been imprisoned and 150,000 more have been suspended from their jobs since the attempted coup in July 2016, which killed 249 people. The crackdown has stretched far beyond the immediate culprits and has swept up people with vague links to the Gulen movement.
The Americans are among them. For the families of the detainees, the drama has shifted from the surreal to deep dread.
Serkan Golge, 37, the NASA scientist of Turkish decent, was arrested in the first frenzy of suspicion and police activity after the coup attempt as he was vacationing in the sleepy southern town of Hatay.
Tipped off by a relative, the police arrested Mr. Golge outside his parent’s house as the family was leaving for the airport to return home to Houston.
At first, his relatives thought it was a bad dream. A year later, as a lengthy prison sentence appears imminent, they are in despair.
“His case is getting worse,” his wife, Kubra Golge, said tearfully in an interview as she cuddled her two small sons. “The lawyer said he no longer knows how to defend the case.”
Since then, she and her two sons, 7 and 19 months, all American citizens, have been barred from leaving the country.
The main evidence against her husband, she says, is the account he held at Bank Asya, a financial institution said to be owned by the Gulen movement, and a dollar bill found in his younger brother’s bedroom that is supposedly a secret sign of membership in the movement.
As the government has begun prosecuting hundreds of Turkish citizens on charges of instigating the coup, the pressure on the Americans and other foreigners has only hardened.
The missionary, Mr. Brunson, lived and raised a family for 23 years in the seaside town of Izmir before he was detained last October and accused of links to the Gulen movement. This summer, he was indicted on new charges of espionage, trying to overthrow the state and acting against the Constitution.
In a recent interview, a presidential adviser defended Mr. Brunson’s continued detention, saying that new evidence must have come to light to merit the additional charges.
But Ihsan Ozbek, the chairman of the Association of Protestant Churches in Turkey, a fellow pastor and a friend of Mr. Brunson’s, dismissed the accusations.
“Andrew was a normal American Christian; he is not a spy,” he said. “I know him; I know his wife and kids. It’s very sad.”
He suggested, as Western officials have, that foreigners like Mr. Brunson, an evangelical Christian missionary, were being held as hostages for political reasons by Turkey. The new charges came soon after the White House intervention.
A NATO member and a long-term ally of the United States, Turkey would never have dared to arrest Americans in earlier times, said Clyde Forsberg, an American professor who was detained in August last year.
“I was arrested because I was an American,” he said by telephone from the Kyrgyz Republic, where he now lives. “The only reason I was released was because I got lucky. It was very early in the game.”
Accused of aiding and abetting a terrorist organization, Professor Forsberg was released after four days in jail for lack of evidence, and he immediately left the country. The case against him is still pending, and he could have ended up incarcerated for months like Mr. Brunson, he said.
“He is still in prison, and that could have been me,” he said, complaining that United States officials had done little to help.
But appeals by American officials, including Mr. Trump, may have only persuaded the Turkish president that he was holding valuable assets that could be used as leverage over the United States.
Mr. Erdogan has also expressed anger at American court cases brought against his personal bodyguards, who are charged with attacking protesters in Washington in May, and a case against a former minister of Turkey and three others charged with conspiring to violate sanctions against Iran.
Perhaps the most high-profile case may be that of Mr. Brunson. The American vice president, who shares Mr. Brunson’s faith, has shown particular interest in his fate. So have the nearly 80 members of Congress who signed a letter to Mr. Erdogan in February asking him to release the missionary and saying he had been unjustly detained.
“There appears to be no evidence to substantiate the charges against him for membership in an armed terrorist organization,” the letter said.
Most of the other Americans detained hold dual citizenship in Turkey, and United States officials have even less ability to help them. Turkish law regards them as Turkish citizens and ignores their rights as Americans.
United States consular staff members have been given only limited access to the Americans in Turkish prisons and have not been able to visit the Turkish-Americans, such as Mr. Golge, at all.
Among them are Ismail Kul, a chemistry professor from Widener University in Pennsylvania, and his brother Mustafa Kul, a real estate agent. They were arrested in August 2016 at their home in Bursa during their summer vacation. They are accused of being members of the Gulen movement and playing a part in the failed coup.
At his trial, which is continuing, Ismail Kul admitted knowing Mr. Gulen but exposed the shakiness of the government’s charges when he explained that it was a member of Mr. Erdogan’s own ruling Justice and Development Party, Ahmet Aydin, the deputy chairman of Parliament, who first took him to meet the cleric.
“In 2010 I met Ahmet Aydin at a culture festival in Philadelphia,” Mr. Kul told the court, the nationalist daily newspaper Sozcu reported in January. “I had breakfast with him and his detail. They told me that they will see Gulen and suggested that I accompany them. That’s how I met Fethullah Gulen. After that, I visited Gulen four or five times.”
The United States Embassy in Turkey has expressed dismay that even local employees working at United States consulates have been swept up.
It issued a statement on Thursday saying that it was “deeply disturbed” at the arrest of a locally employed staff member in Istanbul. He was identified as Metin Topuz by the Turkish state news media, which said he was accused of having ties to Gulen members, spying and attempting to overthrow the government.
“We believe these allegations to be wholly without merit,” the United States Embassy statement said.
The spokesman for Turkey’s Foreign Ministry, Huseyin Muftuoglu, confirmed that Mr. Topuz had been detained on terror charges Sept. 25, but contended that he was neither a staff member of the American Consulate nor entitled to diplomatic or consular immunity.
Another United States Consulate employee, Hamza Ulucay, who had worked for 36 years in Adana, in southeastern Turkey, was detained in February and accused of having contacts with the Gulen movement and the outlawed Kurdish movement, the PKK.
Ms. Golge, 33, the wife of the detained NASA scientist, remains deeply shaken over the trial of her husband, who is expected to be sentenced this month. She describes the shock of his arrest as being like an amputation.
Her American life is gone. She lives with her husband’s parents and visits the prison once a week for a 10-minute chat on a phone through a glass window.
At NASA, her husband was put on unpaid leave. Unable to keep up their mortgage payments, she is selling their house in Houston.
Her husband is resigned, Ms. Golge said. “He is very sad,” she added. “He says, ‘I feel a lot of pain in my heart, but I know it is going to pass.’”
She is more blunt: “They took a hammer and crushed our heads.”