A male inmate has tested positive for the coronavirus and has been moved from the prison to a hospital run by the Corrections Department.
Heath officials announced on Thursday evening that the infected man had until recently worked in Bangkok as a pub DJ and at First Cafe on Khao San Road.
People who had been close to him were being monitored, but no other infections had been detected to date. People who had no direct contact with the man were not in the "high risk" group.
Health officials were confident the situation was under control.
Taweesilp Visanuyothin, spokesman for the Centre for Covid-19 Situation Administration, said earlier on Thursday the prisoner's first test for the Covid-19 virus returned positive.
The inmate, a 37-year-old man, was imprisoned at the Central Special Correctional Institution on drug charges on Aug 26 with 34 other prisoners and officials, according to the Disease Control Department.
The first test conducted by Mahidol University on Wednesday found he was infected with the virus and he was immediately transferred to the hospital that night.
The tests on the 34 others returned negative.
The Disease Control Department collected a sample from the patient on Thursday for a second test, to be done by the Department of Medical Science, for confirmation.
The new case ends the run of 100 days when Thailand had no local infections.
Walairat Chaifoo, the director of the Epidemiology Bureau, said the man showed symptoms on Tuesday but it was not clear whether it was Covid-19 until the test on Thursday.
Before being imprisoned, he lived at Ban Suan Thon condominium in Bang Mod area of Thung Kru district with five other family members. All have been quarantined. "They are a risk group," she said.
Dr Walailak said the man worked as a DJ at the 3 Days 2 Nights pub and restaurant on Rama III and Rama V branches. A press statement issued by the Disease Control Department said he also worked at a coffee shop on Khao San Road.
Dr Walailak said pubgoers who had no direct contact with the patient were not in the high risk group.
Officials are monitoring the conditions of about 20 people who were at the court with him, including his lawyer.
Department of Disease Control director-general Suwannachai Wattanayingcharoenchai said the new local infection was not the start of the second wave, and he was confident the situation could be kept under control.
"If we keep the situation under control, there will be no new outbreak," he said.
Dr Suwannachai called for calm and urged people not to lower their guard against the disease.