A voracious appetite for garlic and cheap prices from neighbouring countries is encouraging contraband allium.
Thailand's military has been called in to tackle garlic smuggling after local prices plunged.
The country is facing an allium crisis as garlic is being illegally moved across its borders from neighbouring countries.
Military officers are working with the customs department and the commerce ministry to try to stamp out the smuggling, Boonyarit Kalayanamit, director-general of the internal trade department, said.
As a result of the contraband vegetable, local farmers are suffering as garlic prices have slumped, falling from 115 baht (£2.70) a kilogram in the same period last year to 77.5 baht (£1.81).
Boonyarit said the three departments were working together "to deal with the issue, particularly garlic smuggled from neighbouring countries".
Anybody found in possession or who moves imported garlic without a permit will face "at least five years" in prison, a fine of up to 140,000 baht (£3,280), or both, he added.
Thailand will produce about 84,000 tons of garlic this year, which is 10.6% higher than last year, due to an increase in growers, especially in the north.
The country relies on importing about 44,000 tons a year to keep up with its healthy appetite for garlic, with about 121,000 tons consumed in Thailand annually.
The Thai government did not say which countries the smuggled goods are mainly coming from, but China, which is close but does not share a border, is the largest producer of garlic in the world.
The latest figures available show China was responsible for 72.8% of the world's garlic exports in 2016, with a value of £2bn - ahead of Spain which is the second largest exporter, responsible for 11.4%.
Chinese garlic prices reached an all-time low in March ahead of the harvest, after high prices from 2015 to 2017.
A kilogram of Chinese garlic is priced at about 54p, considerably lower than Thai prices, even after they dropped dramatically.
Kulit Sombatsiri, director-general of the Thai customs department, said they will be inspecting garlic imports from neighbouring nations.
He said the smuggled garlic is mainly entering Chiang Rai which borders Myanmar and Laos and is just 100 miles from the Chinese border.