BANJUL (Reuters) - Gambia’s National Assembly has passed a resolution to allow President Yahya Jammeh, who lost an election in December, to stay in office for three months from Wednesday when he was due to leave power.

The decision announced on state television will raise tension with leaders of the West African bloc ECOWAS who have threatened sanctions or military force to make Jammeh hand over to opposition leader Adama Barrow who won the election.

Jammeh on Tuesday declared a state of emergency, saying it was to prevent a power vacuum while the supreme court rules on his petition challenging the election result. The National Assembly resolution almost certainly gives the government authority to prevent Adama’s inauguration.

Barrow is in Senegal and could, in theory, be sworn in as president at the Gambian embassy in that country, which is technically on Gambian soil.

Gambia is one of Africa’s smallest countries and has had just two rulers since independence in 1965. Jammeh seized power in a coup in 1994 and his government has gained a reputation among ordinary Gambians and human rights activists for torturing and killing opponents.

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

Jammeh’s decision to reverse that position has created political turmoil. At least five ministers have resigned from his government, hundreds of people have fled to neighbouring Senegal and others in the country say they fear violence.

British tour operator Thomas Cook started evacuating nearly 1,000 holidaymakers 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.