REYHANLI, Turkey -- For two years, the Obama administration refused to arm moderate Syrian rebels it claimed to support, for fear the guns would wind up in the hands of Islamists. In an astonishing turnaround -- propelled by the need to salvage a failing Syria policy -- the administration is now wooing the Islamist rebels it once feared.

A powerful new Islamist military alliance, the Islamic Front, forced the administration's hand last week, by taking over the headquarters of Gen. Salim Idris, who commands the more moderate rebel forces backed by the United States.

The Islamic Front takeover caught U.S. officials by surprise, and the timing couldn't be worse for Washington. Syrian peace talks known as Geneva II -- which are the centerpiece of U.S. policy -- are scheduled to be held in Switzerland in late January, and so far the Islamic Front has opposed them as pointless. With Idris neutered, and his Supreme Military Council humiliated, there is no military pressure on the Assad regime to make any concessions.

So Tuesday, Secretary of State John Kerry said "it is possible" that U.S. officials will meet with the Islamic Front. The Americans hope the Front will reverse its opposition to talks and agree to send representatives. But the Americans are very uncertain about the Islamic Front's goals.

After four days spent talking to civilian and military rebel sources along the Turkish-Syrian border, here are the conclusions I have drawn.

First, the Islamic Front's leaders -- from seven amalgamated Islamic militias -- are strategic in their thinking. They had been part of Idris' Supreme Military Council, but wanted a much larger role; they were unable to achieve this goal via negotiations, so they withdrew from the council a few weeks ago and formed a new Islamic organization.

They apparently staged their takeover of the headquarters with a Trojan horse operation, orchestrating an attack on a nearby rebel base and then appearing as saviors. Once inside the headquarters, they seized it, sending the clear message to moderate rebels and their Western supporters that they were now taking control. Idris may stay on in a political role, but militarily he is toast.

Second, the Islamic Front believes that it should be the dominant power in a new national rebel army and also in any civilian rebel government during a transition period -- or when Assad falls. One well-informed rebel source told me the group contends that it comprises 65 percent of those fighting the regime and believes it will become a magnet for more fighters.

"They want to control everything," this source said. Front leader Zahran Alloush might or might not want to be commander-in-chief, but he wants to have the say over who would hold that post. Negotiations this week between Idris and Alloush may soon clarify the extent of the Front's demands.

Third, the Front wants an Islamic state with sharia law, and has a very ambivalent position on democratic elections and the treatment of minorities. Its vocabulary is strictly Islamic; the values the United States promotes -- free elections, women's and minority rights -- do not appear in its charter. "These are the questions we will want to talk about if we meet, and I hope we will meet," a State Department official told me. But the answers are unlikely to meet U.S. hopes.

Fourth, the Front is strongly opposed to the Islamic State of Iraq and Syria (ISIS), an al-Qaida group that has been taking control of swaths of Syrian territory and which the Front considers an intruder. But, contrary to U.S. hopes, the Front is unlikely to take ISIS on at present. According to Mohamed Khair al-Wazir, who studied with and spent time in prison with Alloush, "The Islamic Front clearly refuses (to recognize) the existence of ISIS. But the fight must be delayed (until Assad is gone)."

Fifth, the United States has gotten itself into a big mess. By not supporting moderate rebel forces early on, while rich Gulf sheikhs poured money into Islamist coffers, the administration created a vacuum that the Islamists have filled. Now U.S. officials need the Islamists to bolster the fragmented Syrian military council, and possibly to finally transform it into something resembling an army.

But the Islamic Front has no reason to bend to U.S. will -- certainly not for the nonmilitary aid we have been sending the rebels. It is wholly unclear whether it will agree to send representatives to peace talks, or support the negotiating process.

"Till now, we don't understand what the Americans want," I was told by Col. Abdul Jabbar Akaidi, a moderate leader in the Supreme Military Council who recently quit in disgust. "You are afraid of the Islamists, but you don't support the moderates. Now you talk with the Islamists because they are strong?"

The answer, born of political desperation, is apparently "yes."

Contact Tracy Rubin at trubin@phillynews.com.