ANKARA, Turkey — Turkey will build a military base in Qatar, its staunchest regional ally, officials said.

The move comes a year after the two countries signed a military cooperation agreement. The treaty was ratified by the Turkish parliament in June.

Turkish diplomats dealing with security matters said that the military base in Qatar will help the two countries to counter common security threats and enemies.

Turkey and Qatar, whose majority of Muslims are Sunni, spearhead efforts for the ousting of Syrian President Bashar Assad, who is supported by Shiite administrations in Iran and Afghanistan, as well as Russia .

The diplomats said that about 3,000 Turkish troops would be stationed at the base in Qatar. The troops will be supported by aerial and naval assets and their operations would be augmented by special forces units.

The multipurpose base also will serve as a military training camp.