Never miss a local story.

Erdogan called Putin “my dear friend” several times during a news conference and pledged that relations with Russia would return not just to their pre-crisis level but progress even higher.

That meeting rang alarm bells in Washington.

Vice President Joe Biden has arranged a trip to Turkey starting next Wednesday. He will be the highest-level American visitor to that country since the attempted coup.

His important mission will be to help bolster relations between the two nations. The United States especially needs to keep Turkey as a close ally because of its proximity to Russia and because it’s the only secular state in the region. America has depended on Turkey to provide some much-needed stability in the Middle East over the years.

Biden apparently sees the danger in what’s going on as Russia woos Turkey and vice versa. The vice president must stress to Erdogan the importance of past — and future — cooperation between their countries.

However, recent events have undermined this critical relationship.

The Turkish government believes that its Western allies — including the United States — have failed the solidarity test.

In recent years there had already been a chill in the relationship because of Erdogan’s growing repression. That has included arresting political opponents and journalists who question his policies.

Now, Erdogan thinks he did not have strong support from his NATO allies after the coup attempt. For example, U.S. Secretary of State John Kerry warned the Turkish government about arresting military personnel as “the actions could have consequences for the NATO alliance.”

But Erdogan put a state of emergency in place anyway, which allowed thousands of military forces to be jailed.

Turkey recently has stepped up its pressure on the United States to extradite cleric Fetullah Gulen, whom Erdogan has accused of being the head of the coup’s plotters. Gulen, who’s in Pennsylvania, has been in America for about 17 years.

U.S. officials so far have refused Turkey’s demands, while seeking proof from that country of Gulen’s involvement. None of this has sat well with Erdogan.

Does it look like America is losing an ally in the region? Not yet, fortunately.

But plenty of people will be watching to see what happens in Syria for a better answer to that question.

The U.S. government, Turkey and European allies all were on the same side when the Syrian civil war began in early 2011. But while the Western allies wanted to topple the Bashar Assad government, Russia and Iran backed the regime in Syria. That led to battles that have killed thousands while creating a refugee crisis that has caused many Syrians to flee to surrounding countries.

The war took a sharp turn around 2014 when the Islamic State and its fighters took over part of the country and a section of Iraq.

After that, U.S.-led coalition forces and Russia separately decided to fight the Islamic State to retake control in Syrian cities. In the last year or so, that has included U.S.-backed Kurdish-Arab-Turkmen forces fighting in battle zones while Germany, France, Turkey and Russia support them. Just this week, Russian jets have conducted missions over Syria from an airbase in Iran.

In this complicated puzzle, NATO and its allies still oppose Bashar Assad’s Syrian government — which Iran and Russia support — yet the war against Islamic State has given them a common enemy.

Erdogan’s recent cozying up to Putin sends the message to the United States and its allies that Turkey can make new friends in the region. It certainly appears that the Russian leader took advantage of cracks in the NATO alliance after the failed coup attempt.

Biden has an extremely important task ahead of him in the immediate future — a task that will pass to the next U.S. president in 2017.

Reducing tensions between Turkey and the United States could help retain a secular, democratic ally in the Middle East.

The chill in relations must be fixed, and Biden’s visit could be the first step in doing that.