Turkish Prime Minister Ahmet Davutoglu attends a news conference after visiting Nizip refugee camp near Gaziantep, Turkey , April 23, 2016. REUTERS/Umit Bektas

DOHA (Reuters) - Turkey deployed soldiers to a new military base in Qatar on Thursday as part of a security agreement which visiting Turkish Prime Minister Ahmet Davutoglu said would help counter threats to both countries.

The move marks a strengthening of cooperation between two countries that have both provided support for the Muslim Brotherhood in Egypt and backed rebels fighting to overthrow Syrian President Bashar al-Assad.

Davutoglu told students at Qatar University that the base, Turkey’s first overseas military installation in the Middle East, was not intended for any specific operation but was a “presence for stability”.

“I came here and I met with our officers. I told them Qatar is your second home, you are not in a foreign country,” he said.

“I can tell you now that the security and stability of Qatar is like the security and stability of Turkey. We want a stable and secure Gulf. Turkey and Qatar, we have the same destiny,” he added. “We face the same threats.”

He said the number of soldiers would be specified later and did not give details on the size or location of the base.

Ahmet Demirok, Turkey’s ambassador to Qatar, told Reuters in December that some 3,000 ground troops would be stationed at the base as well as air and naval units, military trainers and special operations forces.

Establishment of the base, part of an agreement signed in 2014 and ratified by Turkey’s parliament in June, intensifies its partnership with Qatar at a time of rising instability and a perceived waning of U.S. interest in the Middle East.

One of the world’s wealthiest countries, Qatar is home to the largest U.S. air base in the Middle East, Al Udeid, where around 10,000 military personnel are stationed.