The United States and Turkey signed an agreement Thursday to train and equip vetted Syrian opposition fighters, a deal that has been months in the planning but appears to have been held up by a divergence in priorities between Washington and its regional allies.

The agreement was signed Thursday evening by the U.S. Ambassador to TurkeyJohn Bass and Turkish Foreign Ministry Undersecretary Feridun Sinirlioglu, said U.S. embassy spokesman Joe Wierichs. Sinirlioglu called the deal "an important step" in the strategic partnership between Turkey and the United States, according to the state-run Anadolu Agency.

The U.S. military has said it is planning to send more than 400 American troops, including special operations forces, to train vetted Syrian rebels at sites outside Syria as part of the fight against the Islamic State in Iraq and the Levant (ISIL).

U.S. officials have said they plan to train about 5,000 Syrian fighters from the Free Syrian Army (FSA) every year for three years. Saudi Arabia and Qatar, as well as Turkey, have publicly offered to host training sites.

Turkey, which has a 750-mile border with Syria, says it hopes the training will also bolster the weakened and divided Syrian opposition in its war against Syrian President Bashar al-Assad, whose removal from power remains Turkey's most pressing goal in Syria.

The Obama administration, however, is less concerned with Assad than with ISIL, which Washington considers a more significant threat to regional security.

The FSA has been presented as the best force capable of fighting both these wars — against Assad and ISIL — but critics of the training plan note that the group is riven by divisions and is one of the weakest factions on the ground in Syria's civil war.

The FSA's leaders have also made it clear that they intend to focus their fire on the regime, rather than ISIL, the newcomer in a war that was originally about toppling Assad.

The Turkish government has said the training by U.S. and Turkish soldiers could begin as early as next month at a base in the Turkish city of Kirsehir, and involve hundreds of Syrian fighters in the first year.

Al Jazeera and wire services