(Bloomberg) -- Their two leaders share a special bond as survivors of coup and assassination plots, and both are on the lookout for new allies as other longtime partnerships wither.

So Venezuelan President Nicolas Maduro pulled out the stops in welcoming Recep Tayyip Erdogan, the first Turkish head of state to ever visit the country.

Soldiers chanted the Turkish national anthem in unison as children waved red-and-white Turkish flags. Maduro presented Erdogan with a replica of the sword used by Venezuela’s independence hero, Simon Bolivar, and also decorated him with a medal, called “El Libertador,” dedicated to Bolivar.

Erdogan, visiting Caracas just two months after Maduro’s trip to Istanbul, defended the emerging alliance with a country being shunned by the U.S. over abuse and corruption.

“Are we going to seek permission from somewhere about who we will be friends with and with whom we will trade?” Erdogan said in Caracas on Monday, according to Turkey’s state-run Anadolu news agency.

Major Backer

Turkey, whose relations with the U.S. and European Union have frayed, has become one of Venezuela’s most important backers as Washington isolates Maduro’s government. The Venezuelan leader is presiding over one of the most desperate economic and humanitarian crises modern Latin America has known.

Tons of Venezuelan gold -- strip-mined under grim conditions in a desperate rush for cash -- are being shipped to Turkey for refinement and processing. U.S. officials say some of the gold may be making its way to Iran in violation of sanctions on the Islamic Republic. Maduro says the U.S. shouldn’t meddle in his country’s trade with Turkey.

In Caracas, Erdogan and Maduro oversaw the signing of a series of cooperation deals in mining, oil exploration, defense and marine transportation.

Erdogan, who has been censured in the West over his authoritarian ways, rallied behind his new friend, calling a drone attack in August on a military parade where Maduro was present “treason” against an elected leader. Erdogan himself defeated a coup attempt in Turkey in 2016.

“They sometimes call me the sultan. We share a common ground,” he said of Maduro.

“But we’re letting it go,” he said. “We believe that if the people elected as then we’re strong. So, I am congratulating and applauding my friend Maduro who came to power with the will of the people.”

To contact the reporter on this story: Selcan Hacaoglu in Ankara at shacaoglu@bloomberg.net

To contact the editors responsible for this story: Onur Ant at oant@bloomberg.net, Amy Teibel, Mark Williams

©2018 Bloomberg L.P.