The UN Security Council has given Eritrea a five-week ultimatum to withdraw its forces from a disputed border region with Djibouti.
The UN resolution also called for Eritrea to remove its military equipment from the Ras Doumeira region and the island of Doumeira.
A number of people died in June last year during clashes between Djibouti and Eritrea over the area.
The French-drafted resolution demanded Eritrea "comply immediately".
It also welcomed the fact that Djibouti had pulled out its forces from the disputed areas, as requested by the Security Council last June and condemned Eritrea's refusal to do so.
Since Eritrea gained independence in 1993, the Horn of Africa country has been involved in two serious conflicts over territory with its neighbours.
As well as last June's clashes over the Ras Doumeira promontory on the shores of the Red Sea, there have been confrontations between Djibouti and Eritrea in 1996 and 1999.
Last October, the US warned Eritrea that it faced "appropriate action" from the UN if it refused to co-operate to resolve its border dispute with Djibouti peacefully.
The impasse has assumed a greater strategic significance because both France and the US have bases in Djibouti, a former French colony.
The US has more than 1,200 troops there as part of its anti-terrorism task force in the Horn of Africa.