By Tim Cocks

BANJUL (Reuters) - Senegal's army spokesman said on Wednesday that its forces are at the Gambian border and will enter at midnight if the veteran president, Yahya Jammeh, refuses to relinquish power.

Jammeh, who lost a Dec. 1 election to opposition leader Adama Barrow, said he would not step down, citing irregularities in the vote. His mandate ends at midnight (midnight GMT).

"We are ready and are awaiting the deadline at midnight. If no political solution is found, we will step in," said Colonel Abdou Ndiaye, speaking for the Senegalese army.

The Nigerian Air Force said it had deployed to Senegal in case it was needed. Nigeria is part of the West African bloc ECOWAS, which has threatened Jammeh with sanctions or military intervention if he does not step down.

Ghanaian President Nana Akufo-Addo said in a statement Ghana would send 205 combat troops to Gambia as part of a regional mission to enable President-elect Barrow to be sworn in.

Senegal's statement raised the prospect of armed confrontation between forces loyal to the president, who has ruled Gambia for 22 years, and Senegal, which surrounds the tiny riverside country on three sides.

Senegal circulated a draft resolution to the 15-member U.N. Security Council that would give "full support to the ECOWAS in its commitment to take all necessary measures to ensure the respect of the will of the people of The Gambia".

Halifa Sallah, spokesman for Barrow, told a news conference at a Banjul beachside hotel surrounded by palm trees that the coalition "did not want to go to power stepping over dead bodies."

Addressing Jammeh, he said: "The end has come. Accept it."

BARROW TO TAKE OATH

Sallah said Barrow, who is in Senegal, could not be sworn in at the national stadium, as originally planned, but that he would take the oath of office at an undisclosed place.

Diplomats said Barrow could be sworn in at the Gambian embassy in Senegal.

Jammeh declared a state of emergency on Tuesday, while on Wednesday the National Assembly passed a resolution to enable him to remain in office for three months.

Gambia has had only two rulers since independence in 1965. Jammeh seized power in a coup and his government has gained a reputation among ordinary Gambians and human rights activists for torturing and killing opponents.

The draft, seen by Reuters, would endorse the decision of ECOWAS and the African Union to recognize Barrow. It also called on Gambia's security forces to protect lives and property and serve the elected authorities.

It was not immediately clear when Senegal planned to put the draft resolution to a vote. Some diplomats said U.N. Security Council approval was not needed for an ECOWAS military intervention if Barrow requested help.

Mauritanian President Mohamed Ould Abdel Aziz arrived in Gambia late on Wednesday for last-minute talks ahead of the deadline, Gambian state television said.

THOUSANDS FLEE

Few people expected Jammeh to lose the election, and the result was greeted with joy by many in his country, and by democracy advocates across the continent, particularly when Jammeh initially said he would accept the result and step down.

Barrow was examining the implications of the assembly's resolution and the state of emergency, given the constitutional requirement for a handover and the need to maintain peace, Sallah told Reuters.

At least 26,000 people have fled from Gambia to Senegal fearing unrest, the U.N. High Commissioner for Refugees (UNHCR) said on Wednesday, citing Senegalese government figures. The UNHCR said up to 80 percent were children accompanied by women.

Tour operator Thomas Cook <TCG. L> started flying nearly 1,000 holidaymakers home on Wednesday. It said on its website it was laying on extra flights in the next 48 hours to remove 985 package tour customers.

It was also trying to contact a further 2,500 "flight only" tourists in Gambia to arrange for their departure on the earliest available flight, it said in a statement.

Gambia's economy relies on one main crop, peanuts, and tourism. Its beaches are popular with European holidaymakers seeking a winter break.

(Additional reporting by Emma Farge in Ziguinchor, Senegal, Diadie Ba in Dakar, Kissima Diagana in Nouakchott, Michelle Nichols at the United Nations; Writing by Matthew Mpoke Bigg; Editing by Kevin Liffey and Grant McCool)