Panu Keudlappol, commissioner of Thailand's Immigration Bureau, said Aaron Alexis entered Thailand through Suvarnabhumi Airport on March 28 last year and left the kingdom through the border checkpoint in Ban Klong Luek, Sa Kaeo province, a month later on April 28.
He re-entered Thailand through the same checkpoint and stayed in the country for 12 days. He left again via Suvarnabhumi airport on March 9.
Mr Alexis was not on the Thai authorities’ blacklist or watch list, Lt Gen Panu said.
The Associated Press quoted US law enforcement officials as saying that Mr Alexis had been suffering from a number of serious mental issues, including paranoia and a sleep disorder. He also had been hearing voices in his head, the officials said.
Mr Alexis had been treated since August by the US federal government 's Veterans Administration for his mental problems, the officials said.
At the time of the shootings, he worked for The Experts, a subcontractor on an HP Enterprise Services contract to refresh equipment used on the Navy Marine Corps Intranet network.
After leaving the US Navy reserves in 2011, Mr Alexis worked as a waiter and delivery driver at the Happy Bowl Thai restaurant in a suburb of Fort Worth, Texas, according to Afton Bradley, a former co-worker. Alexis left in May, Bradley said.
Having travelled to Thailand, Mr Alexis learned some Thai and could speak to Thai customers in their native language.