NASA scientist released from Turkish prison after nearly 3 years: 'I do not know what to do now' Turkey accused Serkan Golge of belonging to a terrorist organization in 2016.

Istanbul, Turkey -- Turkey has released Serkan Golge, a NASA scientist who the country accused of belonging to a terrorist organization.

Golge, who has dual U.S.-Turkish citizenship, was visiting his birth country with his family in 2016 when Turkish officials arrested him in the wake of a failed coup, which Turkish leaders blamed on the self-exiled U.S. cleric Fethullah Gulen.

He appealed to the country's Supreme Court earlier this year, when he thought he should have been released after serving a large portion of his sentence, which Turkish law allows.

"My release was all of the sudden. It was surprising," Golge told ABC News. "Some officials came to my cell and told me that I am OK to go and they almost dragged me out of the prison. It was so quick -- you cannot imagine. Everything happened in 15 minutes."

Golge said prison officials dropped him off outside of the facility in Hatay late Wednesday night -- without a cellphone or anything else -- and told him he was a free man. He walked barefoot for about 1.2 miles and found a village, where he called his family and asked them to pick him up.

Golge said he can't immediately return to the U.S. because he doesn’t have his passport and isn't allowed to leave the country.

"All accusations against me are false," he said. "This release shouldn’t be taken as a favor or blessing. My freedom is my right and it was violated the last three years."

"I will keep asking for my rights and what has done to me. I am planning to take this to European Court of Human Rights," he added.

He said officials told him that he wasn’t pardoned -- his case is still ongoing -- but the Supreme Court simply decided that he didn’t have to stay in prison any longer.

He said he’s scheduled to appear in court to "sign some papers" and speak with his lawyers on Thursday.

"I do not know what to do now. I lost my job at NASA," he said. "I lost all my savings because of what has happened to me."

Golge’s lawyer confirmed his release to ABC News on Wednesday and State Department spokeswoman Morgan Ortagus said she welcomed the news in an on-camera briefing.

"We will continue to follow Mr. Golge's case closely, along with those involving our own locally employed staff at Mission Turkey," she said.

Ortagus said she didn’t "want to speculate on the intentions of the Turkish authorities, but we want to commend them for doing the right thing today by releasing him."

News of Golge’s release comes after the White House and the Turkish president’s office revealed that the leaders of the two countries spoke on the phone earlier on Wednesday.

White House deputy press secretary Judd Deere said President Donald Trump and President Recep Tayyip Erdogan spoke about Trump’s recent decision to reduce steel tariffs on Turkey, Turkey’s plan to buy the Russian S-400 missile defense system and a meeting at next month’s G20 summit in Osaka, Japan.

Deere’s readout didn’t mention Golge or anyone else held by Turkey.

Golge’s lawyer said the decision came from Turkey’s Supreme Court and wasn’t sure what specifically prompted it.

ABC News' Ben Gittleson contributed to this report.