The visit of Saudi Arabia's King Salman to Turkey – in all he will spend five days there including two at the Organisation of the Islamic Conference in Istanbul - is being seen by the Turkish media as a landmark event. It is certainly a visit on an exceptionally grand scale – the king’s delegation took over an entire high-rise hotel and will have a fleet of 500 Mercedes at its disposal.

Turkish President Recep Tayyip Erdogan, King Salman’s host, signalled the special importance of his visitor by meeting him in person at Ankara Airport and driving back into town together with him. Normal protocol rules would have suggested that the king would be met by a minister and only meet the president in his palace later.

President Erdogan was probably responding to a similar honour paid to him when he visited Saudi Arabia last December and was met at the airport by the king. Shortly afterwards photographs were issued of the two heads of state sitting together below a large portrait of Kemal Ataturk, the secularist founder of the Turkish Republic. On Tuesday, King Salman received Turkey’s top decoration.

A very clear message is that the two countries are now on their way to becoming close regional strategic partners, in fact we should perhaps now be speaking directly of them as allies.

During President Erdogan's visit to Saudi Arabia in December, the two countries signed a strategic cooperation agreement, covering military, economic and investment and intended specifically to foster cooperation between 34 Muslim countries against terrorism.

Military alliance

From the Saudi angle, these moves appear directed towards creating a “Nato-like” military alliance of Islamic countries to combat terrorism. Turkey, a NATO member since the early 1950s, is probably more concerned with building up its regional strategic capacity in the Middle East and Indian Ocean: apart from the Saudi agreement, Turkey is building military bases in Qatar (another close ally) and Somalia, and is building its first-ever aircraft carrier. The Turkish press has given periodic coverage to the apparently predominantly Saudi and Turkish "Islamic Army" now being created with its central command in Riyadh.

Turkey, with a population of 78 million, the second-largest armed forces in NATO and sophisticated defence and military electronics industries, will inevitably be one of the most influential members of the Islamic Force against Terrorism. It is not difficult to see why it is interested in going down this route. Pro-government journalists in Ankara cite exasperation with the West and suspicion of US motives as reasons why the two countries are drawing so close together.

Ilnur Cevik writes in the pro-AKP newspaper Daily Sabah that “two countries are leading powerbrokers in the region, that they are aware of their common heritage and vital common interests, and do not like the current turn of events with Western powers seemingly making a major effort to redraw the map of the Middle East according to their own interests…. They do not like what they see in Iraq, Syria and Yemen.” The US rapprochement with Iran is a background part of this picture.

An alliance which by now includes 39 members might seem potentially unworkable but in February and early April the Islamic Force has already engaged in military exercises described as the largest ever seen in the Middle East. Turkey and Saudi Arabia both currently have awkward relations with their historical military protector, the USA, so the talks in Ankara will explore ways of raising the profile of the new Islamic force as at least a partial substitute.

The foremost issue however is cooperation against the Islamic State (IS). For nearly two months now, Saudi jets have already been using military airbases inside Turkey against IS. The threat from IS is now explicit. Shelling by IS forces of Kilis and other towns inside Turkey seems to be growing more frequent, alarming the local population. The number of reported detentions of Turkish IS members also seems to be rising.

Turkey and Saudi Arabia want to intensify cooperation with other Islamic countries in the struggle against IS, and the need to work together against terrorism is expected to be a main theme of the OIC meeting in Istanbul and stressed in a joint communiqué by foreign ministers on Tuesday - one of them, it should be noted, being the Egyptian Foreign Minister Sameh Shoukry.

Syria and Egypt

Then there is the civil war in Syria and diplomatic efforts for a settlement. Though Turkey seems to have scored a victory by excluding the Syrian Kurdish Democratic Union Party (PYD) from the discussion, neither Turkey nor Saudi Arabia stands much chance of ensuring the replacement of Bashar al-Assad as leader.

By contrast Turkish-Egyptian relations, which have been at a very low ebb since a military coup in Egypt overthrew President Mohammed Morsi in July 2013, probably do offer a chance for progress - indeed it may be one of the chief Saudi accomplishments during this visit.

The issue of relations with Egypt is a deeply sensitive one for the Turkish government, a longstanding supporter of the Muslim Brotherhood in both Egypt and Syria. But despite Turkey’s commitment to the deposed President Morsi, times seem to be changing. Before flying to Ankara, King Salman paid a five-day visit to Egypt in which, despite Muslim Brotherhood protests, Saudi Arabia concluded a set of deals with President Abdel Fattah al-Sisi of Egypt, including the building of a bridge between the two countries - and the controversial cession of two islands by Egypt to Saudi Arabia.

So will Turkey now soften its attitude towards Cairo? The answer may well be yes. Turkey’s state Anatolia news agency gives a broad hint in an article on Tuesday that there will be a change, quoting Muhittin Ataman, a senior analyst at the AKP’s think tank SETA as saying "We know that there are serious problems between Turkey and Egypt. These should be softened."

Does this reflect Erdogan's thinking? There is probably not long to wait as the main test for this "softening" is apparently whether or not Sisi comes to Istanbul to attend the OIC summit in the middle of this week.

- David Barchard has worked in Turkey as a journalist, consultant, and university teacher. He writes regularly on Turkish society, politics, and history, and is currently finishing a book on the Ottoman Empire in the 19th century.

The views expressed in this article belong to the author and do not necessarily reflect the editorial policy of Middle East Eye.