Dakar - Gambia headed late Wednesday toward a midnight showdown between a president who refuses to leave office and a president-elect who insists he will take power, while a regional force moved toward the country's borders in a threat to intervene.Hours before the end of President Yahya Jammeh's mandate, legislators voted to extend his term by three months. Jammeh, who declared a three-month state of emergency on Tuesday, is challenging his loss in December's election, citing voting irregularities.But an adviser to President-elect Adama Barrow, Mai Ahmad Fatty, warned in a Facebook post that "those who resist peaceful change effective 12 midnight tonight shall face definite consequences, to their peril. Anyone with firearms tonight shall be deemed a rebel, and will certainly become a legitimate target."Supporters of Barrow insisted that he would be sworn in Thursday on Gambian soil. Barrow has been in neighboring Senegal for his safety, and It was unclear whether he might take the oath at a Gambian Embassy outside the country or if he would return.A military commander with the West African regional bloc known as Ecowas announced that Jammeh had only hours to leave. "We are waiting so that all political means have been exhausted. The mandate of the president is finished at midnight," Seydou Maiga Mboro said on Senegalese radio station RFM, adding that "all the troops are already in place."Detentions and torture The regional force was seeking the UN Security Council's endorsement of its "all necessary measures" to help remove Jammeh from power, according to a Senegal-circulated draft resolution seen by The Associated Press. The resolution was not drafted under Chapter 7 of the UN charter, which can be enforced militarily.Tourists were being evacuated from the tiny West African country. The capital, Banjul, was empty downtown, with all shops closed. A minimal security presence was on the streets.Gambia's president-elect has the backing of the international community. "The U.N. supports regional efforts aimed at resolving the crisis," the deputy spokesperson for the UN secretary-general, Farhan Haq, said Wednesday, noting the end of Jammeh's term.In another sign of the mounting international pressure, Nigeria confirmed a warship was heading toward Gambia for "training" as regional countries prepared for possible intervention. Diplomatic efforts by Ecowas have failed to persuade Jammeh to step down.Gambia, a country of 1.9 million people, is estimated to have just 900 troops.As the crisis deepened, more than 1 000 mainly British and Dutch tourists began leaving Gambia on specially chartered flights. Hundreds streamed into the airport, seeking information on departures.Thousands of residents have been fleeing to Senegal, including a number of Jammeh's former government ministers, who resigned this week.However, many tourists continued to enjoy lying on the beach. While Jammeh's government has been accused by human rights groups of arbitrary detentions and torture of opponents during his 22-year rule, the government has promoted Gambia as "the smiling coast of Africa."Gambia's new state of emergency bans people from "any acts of disobedience" or violence, and it tells security forces to maintain order.