BANGKOK (Reuters) - Thailand and China are in talks about building military production facilities in Thailand, a Thai defense ministry spokesman said on Wednesday, the latest sign of warming relations between China and America’s oldest ally in Asia.

Thai soldiers attend a morning training at military barracks in Prachin Buri outside Bangkok, Thailand, July 29, 2016. REUTERS/Chaiwat Subprasom

Relations between Thailand and the United States cooled following a May 2014 military coup that the Thai military said was necessary to end months of unrest, including street protests that led to the ouster of an elected government.

The United States has said relations cannot return to normal until democracy is restored. The generals running Thailand have promised an election for 2017.

Since the coup, the military government has sought to counterbalance U.S. ties by developing relations with China and Defense Minister Prawit Wongsuwan met his Chinese counterpart, Chang Wanquan, during a visit to Beijing last week.

“The defense minister told his Chinese counterpart that we are interested in setting up facilities to repair and maintain the Chinese equipment we currently have in our arsenal,” ministry spokesman Kongcheep Tantravanich told Reuters.

“We will also look to their expertise in producing small arms and other security-related equipment like drones,” he said.

Thailand has also held talks with Russia about setting up similar production facilities, said Kongcheep, without giving details.

Following the 2014 coup, the U.S. froze security and defense aid to Thailand. It has also scaled back annual military exercises citing concern about Thailand’s political development.

Donald Trump’s election victory has also raised questions about prospects for a U.S. “pivot” toward Asia, a central policy of outgoing U.S. President Barack Obama.

“If the U.S. is unable to back up its regional role ... the regional states have no other choice but to accommodate Beijing,” said Thitinan Pongsudhirak, a political science professor at Bangkok’s Chulalongkorn University.

Kongcheep said military relations with the United States were expected to get back on track after Thailand’s election.

“The relationship is not yet perfect,” he said.

“Once Thailand returns to democracy, I expect the relationship to return to normal.”