Thailand has bought the first of three submarines from China in the strongest signal yet the military-ruled country is reducing reliance on its long-time ally, the United States.

A Thai navy admiral signed an agreement for the $US393 million ($530 million) Yuan-class diesel vessel in Beijing even though Thailand's state audit office is still investigating the purchase.

Prayuth Chan-Ocha, Thailand's Prime Minister. Credit:Getty Images

Thailand's cabinet, dominated by military officers who seized power in a 2014 coup, approved the deal in secret in April, prompting accusations of a lack of transparency in the country's largest defence purchase.

The US downgraded defence ties with Thailand after the coup, including reducing participation of its troops in joint military exercises.