Gambian President Yahya Jammeh has declared a 90-day state of emergency a day before his official mandate ends.
In his televised announcement, Jammeh said "any acts of disobedience to the laws The Gambia, incitement of violence and acts intended to disturb public order and peace" are banned under the state of emergency.
He said security forces were instructed to "maintain absolute peace, law and order" and denounced foreign interference in The Gambia's election.
Barrow, a property developer, is meant to be inaugurated as the new president on Thursday.
Jammeh initially accepted the election results but then decided he wanted them annulled after the electoral commission admitted some errors, although it insists this did not affect the final outcome.
The Supreme Court is unable to hear the challenge until May because of a shortage of judges, and Jammeh has said he will not step down until then.
At least three Gambian ministers, including the foreign minister, have resigned in recent days. Thousands of Gambians have also fled to Senegal, and further afield to Guinea-Bissau, amid fears of violence.