Turkish President Recep Tayyip Erdogan has arrived in Qatar's capital, Doha, on his second visit to the Gulf country since the start of a major diplomatic crisis more than five months ago.

Erdogan will be hosted by Qatari Emir Sheikh Tamim bin Hamad Al Thani on Wednesday to discuss bilateral ties and regional developments, a month after a meeting between the two leaders in the Turkish capital, Ankara.

The Turkish president has been a major supporter of Doha since Saudi Arabia, Bahrain, the United Arab Emirates, and Egypt cut ties and blockaded Qatar on June 5, accusing it of supporting "terrorism" and fostering ties with their rival Iran.

Qatar denies the accusations.

Erdogan, who also visited Qatar in July as part of a regional Gulf tour in a bid to defuse the crisis, has strongly spoken out against the measures applied by the Saudi-led group of countries.

In a show of solidarity, Turkey has also sent cargo ships and hundreds of planes loaded with food to break the blockade.

Ankara has a military base in Qatar and deployed more troops after the crisis erupted. The closure of the Turkish base was one of 13 demands by the Saudi-led group of countries in order to lift their embargo on Qatar.

Erdogan and Sheikh Tamim will attend on Wednesday the third meeting of the Turkey-Qatar Supreme Strategic Committee, set up to strengthen bilateral relations.

Here, Al Jazeera examines the strategic relationship binding the two countries.

Military and diplomatic ties

In an extraordinary session on June 7, two days after the start of the Gulf crisis, Turkey's parliament ratified two earlier deals allowing Turkish troops to be deployed in Qatar, and another approving an accord between the two countries on military training cooperation.

The agreements aimed to raise Qatar's defence capabilities, support "counterterrorism" efforts and maintain regional security and stability.

Five armoured vehicles and 23 military Turkish military personnel arrived in Doha on June 18 with plans to increase the number of troops to 3,000 and keep a brigade in the Gulf country.

The blockading countries have set the closure of the Turkish base in Qatar as one of 13 conditions to restore relations with Doha.

During an attempted Turkish coup in 2016, Qatar quickly offered support to its government, and, as noted by the Turkish ambassador to Qatar, "Sheikh Tamim bin Hamad Al Thani was the first leader to call President Erdogan and express support to our government and Turkish people".

On Tuesday, Qatar's envoy to Turkey underlined the importance of Erdogan's visit to Doha, hailing Ankara's efforts to mediate the Gulf crisis.

"We believe that high-level diplomatic visits between Qatar and Turkey are very important and necessary," ambassador Salem bin Mubarak Al Shafi told Turkey's state-run Anadolu Agency.

"Such visits maintain the momentum in bilateral relations and help better consult and coordinate on swift changes and regional and international issues," he added.

Turkey is protecting its own interests through the base in Qatar, rather than taking sides between the parties at odds. And Ankara's interests require stability in the region. Therefore, Turkey would be against an attack on Saudi Arabia as much as Qatar." Yasin Aktay, Turkey's Justice and Development Party

Food security

When the Gulf crisis erupted, Saudi Arabia closed Qatar's only land border. The move blocked many vital imports from reaching Qatar, including basic food supplies. To avoid potential food shortages, Turkey sent cargo planes full of milk, yoghurt and poultry in less than 48 hours.

Turkish exports to Qatar increased by 90 percent in the four months since the blockade started (June to September), according to statistics released by Turkey's Aegean Exporters' Association.

Because of longer import routes, Qatari food and beverage prices jumped 4.2 percent in August. Fikret Ozer, Turkey's ambassador to Qatar, said on Monday: "We are bringing many products here, but there is no land route between Turkey and Qatar. But now there is a cooperation between Qatar and Iran and Turkey, and there will be a new route between these countries."

Qatar has invested $444m in a 530,000-square metre food storage and processing facility at its Hamad Port.

Turkey hopes its improved trade relations with Qatar will outlive the blockade. "The Turkish products [we export] are of very high quality. Even if the embargo [on Qatar] is [lifted], our products will be permanent there," said Sinan Kiziltan, chairman of the Aegean Aquatic Products and the Animal Products Exporters' Union.

As part of its National Food Security Programme, Qatar aims to produce 70 percent of its food requirements by 2024.

The transport ministers of Qatar, Turkey and Iran will soon sign a deal to launch a Qatar-Turkey route through Iran in a move to boost trade between the two countries, Qatar's News Agency said on Tuesday.

The agreement is aimed at providing the basic needs of people in Qatar.

We started to import food, milk and other such items from Turkey on the first day of the blockade Sheikh Ahmed Bin Jassim Al Thani, Qatar's Minister of Economy and Trade, said in an interview with Al Jazeera

Qatari investments

Even before the blockade, Qatar had a lot of trust in the Turkish economy. In May, Qatar's Chamber of Commerce Vice Chairman Mohamed bin Twar said: "Turkish companies here are handling projects worth about $11.6bn in Qatar, most of which is put into FIFA World Cup 2022 projects."

"Qatar's investment to Turkey is over $20bn, the second highest value of investments by any country in Turkey," added bin Twar.

Turkish media reported Qatar would invest a further $19bn in Turkey in 2018, with $650m going to agriculture and livestock.

The Qatar Chamber encourages Qatari businessmen to invest in Turkey, "due to its attractive investment advantages as well as its strong relations with Qatar."

Turkey is also one of Qatar's top customers for non-oil exports, according to the Gulf country's chamber of commerce.