yahya jammeh
A midnight deadline passed for Gambian President Yahya Jammeh to leave office. He's pictured here at the Africa-South America Summit on Margarita Island, Venezuela, Sept. 27, 2009. Carlos Garcia Rawlins/Reuters

Troops massed along Gambia’s borders as negotiations were underway early Thursday for President Yahya Jammeh to turn power over to businessman Adama Barrow, who won the country’s Dec. 1 election.

Jammeh, who once threatened to slit the throats of gay people, was supposed to vacate the office at midnight, but the deadline passed. He imposed a 90-day state of emergency and said he wants the courts to rule on the validity of the election result, claiming “irregularities,” but the case has stalled because the Supreme Court has a single judge.

Barrow, who fled to Senegal after the election, tweeted optimism.

MENA reported negotiations were underway at the airport in Dakar, Senegal, on an exit deal. Senegalese President Macky Sall, Mauritanian President Mohamed Ould Abdel Aziz, who met Wednesday with Jammeh, and Barrow reportedly consulting.

The Gambian army reportedly has joined forces with troops of the Economic Community of West African States (Ecowas), which has urged Jammeh to leave office peacefully.

Earlier, Gambian army chief Ousman Badjie said his troops would not fight, Agence France-Presse reported.

"We are not going to involve ourselves militarily, this is a political dispute," he said. "I am not going to involve my soldiers in a stupid fight. I love my men."

The African Union said it would stop recognizing Jammeh as president at midnight.

Senegalese troops massed along the border with Gambia, poised to move in should negotiations fall through, the Associated Press reported. Nigeria also has sent warships to the region.

At least 26,000 of Gambia’s 1.9 million people have fled the country, fearing political turmoil. Tourists also are leaving.

Ecowas has asked the U.N. Security Council for the authority to use “all necessary measures” to remove Jammeh.

Jammeh seized power in a 1994 coup, claiming his rule is endorsed by Allah, and at one point started a campaign to have himself anointed king. Human rights groups have accused him of killing and jailing political opponents, raising fears for Barrow’s safety. By staying in office, Jammeh can avoid prosecution for alleged abuses.

The opposition said it would go ahead with Barrow’s inauguration, but it was unclear whether it would be held in Banjul stadium as planned or at a Gambian embassy outside the country.