Thailand and Saudi Arabia have agreed to patch up diplomatic relations during a visit by the Thai prime minister to Riyadh on Tuesday.
Ties between the two countries had been strained for over 30 years since the theft of jewels by a Thai worker from a Saudi palace.
The meeting between the leaders of the two countries was the first at such a high level in decades.
Prime Minister Prayut Chan-o-cha met with Crown Prince Mohammad bin Salman, and the two sides agreed to resolve their differences, send ambassadors and restore full diplomatic relations.
A Saudi statement adds they will strengthen economic cooperation, including on energy resources.
Saudi Arabia's national airline announced the start of direct flights between the two countries in May.
Bangkok says the tourism industry will benefit, and Thais will be able to work in the country again.
Saudi Arabia downgraded ties after the jewels were stolen in 1989. Thai media report that some have been returned. But Riyadh says most were counterfeit, and a rare 50-carat blue diamond remains missing.
Yet the Saudis say they are satisfied with Thailand's efforts to resolve the matter.