The streets outside the airport in Islamabad, the capital city of Pakistan, were adorned with flowers, lights and banners on Wednesday welcoming Turkish President Recep Tayyip Erdogan.
One banner in particular attracted media attention. It read: "We pray for the martyrs of the July 15 failed coup."
For Pakistani journalists and political analysts, the message drafted by the Pakistani government was an assurance to Erdogan that it stood by him in his fight against what the Turkish government has designated as FETO, or the Fethullah Terror Organisation.
FETO is accused of plotting July 15's failed coup, which aimed to unseat the Turkish government and president. A section of the Turkish military turned rogue, barging into key government offices and firing upon demonstrators and even the parliament â killing 265 people â before being stopped.
Since then, Turkey has been seeking the extradition of Fethullah Gulen, a reclusive septuagenarian preacher who lives in the US state of Pennsylvania. The government accuses Gulen of being the mastermind behind the failed coup attempt, and his men have infiltrated several Turkish institutions. So far, the government has arrested several hundred people with alleged links to FETO.
The day before Erdogan landed in Islamabad, the Pakistani government expelled 100 Turkish teachers allegedly associated with FETO who taught at schools in Pakistan funded by Gulen.
"It [the expulsion] was to assure the president that we are on his side," Ayesha Siddiqa, a political commentator from Pakistan told TRT World. "Pakistan doesn't have much to offer to Turkey."
Siddiqa said that there is an "acute sense of isolation" growing within the Pakistani political establishment. The country received a jolt when five nations – India, Bangladesh, Bhutan, Afghanistan and Sri Lanka – pulled out of the South Asian Association for Regional Cooperation (SAARC) that Pakistan was scheduled to host in October. The countries cited rising military escalation between India and Pakistan as a reason for opting out.
"Erdogan's visit gave the government a sense of confidence. He lifted the cloud of isolation from the country," Siddiqa said.
For the Pakistani government, however, Erdogan had more to offer.
Though the agreement to finalise the free trade deal by the end of this year attracted attention, the growing military cooperation between the two countries was another key focus of Erdogan's visit.
"When it comes to defence," Abdul Akbar – a spokesperson at the Pakistan Embassy in the Turkish capital of Ankara – told TRT World, "The main issue is trust. And Turkey and Pakistan trust each other."
Akbar said that with Turkey's support, Pakistan has upgraded its aging F-16 fighter jets. And in 2013, he said, the Turkish government transferred some naval technology to help Pakistan build its first-ever fleet tanker, which was deployed in the Arabian sea in August.
"The tanker will help us refuel our jets in the middle of the sea," he said. "Our fighter jets don't have to come to the dockyard to refuel anymore."
In return, Pakistan will offer Mashaal jet. The Pakistani Air Force uses the aircraft to train pilots.
Ties between Turkey and Pakistan date back to when Pakistan was formed in 1947. Muhammad Ali Jinnah, the founder of Pakistan, was inspired by Mustafa Kemal Ataturk, the founder of modern Turkey. Religious and cultural similarities contribute strongly to the alliance, and the two countries have supported each other in the international disputes over Kashmir and the Turkish Republic of Northern Cyprus, further strengthening their relationship.
In 2001, two years before Erdogan came to power, trade between Turkey and Pakistan was worth $100 million. By 2015, it had grown to $600 million. Through the free trade deal the two countries are preparing to sign by the end of December, Erdogan aims to boost business ties to $1 billion.
The Turkish government perceives this relationship as going beyond trade deals. "Turkey is trying to bring regional peace," said Omer Korkmaz, chief advisor to Turkish Prime Minister Binali Yildirim.
Korkmaz said that it is "not necessary to expect anything from Pakistan in return."
"We are brothers. We have established this relationship in good faith," he explained.