BEIJING -- Turkish leader Recep Tayyip Erdogan met here with Chinese President Xi Jinping on Tuesday in a visit that showed Turkey's eagerness to bolster economic ties amid tensions with the U.S. and the European Union.

"We have agreed to strengthen Turkey-China relations in every area with a long-term strategic perspective," the Turkish president told reporters.

Xi told Erdogan that as emerging markets, the two countries "should increase mutual trust and strengthen strategic cooperation and coordination," according to Turkey's official Anadolu News Agency

This was the second meeting between Erdogan and Xi in less than three weeks following an international conference in Tajikistan in mid-June. The Turkish president this week went the extra mile to visit Xi here rather than simply sit down together at last week's Group of 20 summit in Japan.

Before his arrival, Erdogan expressed to Chinese media his willingness to mend ties with Beijing and urged further cooperation in areas including transportation, tourism, trade and investment. These were also areas highlighted in an exclusive interview with Nikkei last week as priorities for Japanese partnerships.

On infrastructure, Erdogan told the state-run Xinhua News Agency that there is "a natural harmony between our Middle Corridor Initiative and China's Belt and Road Initiative."

"This harmony allows us to cooperate with China in large geographies such as Central Asia and Africa," Erdogan said.

Before Erdogan's trip, Turkish Foreign Minister Mevlut Cavusoglu told the Nikkei Asian Review that the leaders would have only a limited time to talk at the G-20. "We have important projects like high-speed railways, nuclear power plants and others. [The] many projects need a much longer meeting," he said.

Erdogan's China visit comes after meetings with U.S. President Donald Trump and Russian President Vladimir Putin in Osaka. The Turkish leader has agreed to buy Russian S-400 missile air defense systems despite a threat of economic sanctions by the U.S. against Moscow. "Next month we will start to receive this system," Erdogan told Nikkei.

The deal angered Washington, prompting a threat of economic sanctions. After meeting Trump in Osaka, Erdogan said the president had told him that no sanctions will be imposed. He told Chinese media that defense is an area in which Turkey and China can cooperate.

U.S. President Donald Trump, right, meets with Turkish President Recep Tayyip Erdogan during the G-20 leaders summit in Osaka on June 29. © Reuters

The EU, meanwhile, is threatening Turkey with sanctions over the country's hydrocarbon exploration in the eastern Mediterranean, where Turkish drilling has put the country at odds with EU member Cyprus.

Now Turkey is turning to China, hoping to attract investment, financing and tourists. Erdogan has repeatedly underlined his desire to integrate Turkey's infrastructure with China's Belt and Road Initiative. He has been negotiating with Beijing regarding the construction of a high-speed railway that would use Chinese financing and technology. He is also working on a deal in which Chinese companies would build a nuclear power plant in Turkey.

But Turkey-China relations have been strained by Beijing's handling of the Uighur population in western China's Xinjiang autonomous region. Public opinion in Muslim-majority Turkey is sympathetic to the Uighurs, more than 1 million of whom reportedly are being detained in "re-education camps."

Turkish Muslims and the Uighurs share ethnic, religious and linguistic roots. In February, a strongly worded Turkish Foreign Ministry statement amid unconfirmed reports regarding the death of a celebrated poet and musician in one of China's Uighur camps prompted a fierce backlash from Chinese authorities.

Erdogan has been silent on the issue for a long time. In 2009, though, he called Beijing's treatment of the Uighurs "tantamount to genocide."

China has taken a carrot-and-stick approach with Erdogan.

Deng Li, China's ambassador to Turkey, in March told Reuters: "Criticizing your friend publicly everywhere is not a constructive approach. If you choose a nonconstructive path, it will negatively affect mutual trust and understanding and will be reflected in commercial and economic relations."

At the end of the same month, Deng told Turkish media that China wants to double both its investment in Turkey, to $6 billion, and the number of Chinese tourists who travel to Turkey, to 800,000, by 2021.

In recent years, China has increased investments in Turkey.

Murat Kolbasi, chairman of the Turkey-China Business Council, said the number of Chinese companies in Turkey rose after state-owned lenders Industrial and Commercial Bank of China and Bank of China established a presence in the country in 2014 and 2017, respectively. More than 1,000 Chinese companies now operate in Turkey.

"Diversifying alliances and becoming more independent have long been President Erdogan's goal," said Ozgur Unluhisarcikli, director of the Ankara office at the German Marshall Fund of the U.S. think tank. "Turkey wants to establish new alliances with countries like Russia and China while remaining in NATO."