Officials from Nigeria and Cameroon have held a joint ceremony in the disputed oil-rich Bakassi peninsula to mark its transfer to Cameroon.
The handover is unpopular with Nigerian residents
Nigerian troops completed their withdrawal and transferred control of the northern part of the territory.
The rest of the peninsula will remain under Nigerian civil administration for the next two years, in line with an International Court of Justice ruling.
But the mainly Nigerian population is deeply unhappy about the handover.
The ceremony in the Bakassi fishing town of Archibong came four years after the International Court ruling.
Officials from both countries witnessed the Nigerian military lowering its flag and the Cameroon flag was then raised.
The decision was aimed at settling the territorial dispute, which had led to a series of bloody clashes between Nigeria and Cameroon in the 1990s.
Bakassi juts into the Gulf of Guinea, an area which may contain up to 10% of the world's oil and gas reserves. It is also rich in fish.
But the court ruling has not gone down well with Nigerians living in the peninsula, the BBC's Alex Last reports from nearby Calabar.
Most Archibong residents have said they would rather leave their ancestral land than be ruled by Cameroon, such is their level of mistrust.
Nigerian inhabitants have been given the option of staying under Cameroonian authority or being resettled in Nigeria.
But, despite the Nigerian government's promises, no accommodation has been set up for those wanting to leave.
A few Bakassi young men have said they will stay and fight any attempt by Cameroon to administer the place.
Many Bakassi residents say they do not want to live in Cameroon
They have requested help from militants along the coast in the Niger Delta, but it is unclear if any help is forthcoming.
Nigeria began withdrawing some 3,000 troops from the Bakassi peninsula on 1 August, years after they were sent in following complaints from Nigerian residents of harassment by Cameroonian police.
The two countries nearly went to war over the territory in 1981 and bloody clashes claimed 34 lives in 1994.
That year, Cameroon took Nigeria to the International Court in The Hague, which after years of legal wrangling ruled in favour of Yaounde in 2002.
Nigeria rejected the ruling, but the UN intervened and the two countries set up a UN-chaired joint commission to resolve the conflict.
The peninsula has been administered by Nigeria since independence from Britain in 1960.
However, Cameroon based its claim of sovereignty over the region on maps dating back to the colonial era