The men, who were studying at a school in Pakistan, were trying to catch a Thai Airways flight on June 8 when they were intercepted.
Read: ASF detains 5 Thai nationals for carrying firearms
Thailand's government said an investigation into the students found the men had no links to the Islamic State militant group or any criminal organisation.
"The five Thai students were released from Pakistan and traveled back to Thailand this morning," Sek Wannamethee, a spokesman for Thailand's foreign ministry, told Reuters.
The students were released by Pakistani authorities on Monday, he said. He gave no details about negotiations to free the men but added that the case against them would be handled by Thai embassy staff in Pakistan.
Read: Thai students detained in Pakistan have no Islamic State links: government
"In terms of the case, it has not finished yet. Thai embassy officials will continue to work on this case until it is over."
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ