Sudan has announced it is closing its border with Libya because Darfur rebels operate in the area.
The border is to close on Thursday, 1 July, an interior ministry statement said.
Libya said it understood the decision, given the upheaval in Darfur.
Rebel leader Khalil Ibrahim is based in Libya and the move is seen as attempt to prevent him from returning to Darfur.
The Sudan-Libya border includes the Darfur region, where the UN estimates that 300,000 people have died since fighting broke out between Sudanese government forces and rebels in 2003.
The Sudanese statement said the decision was taken to protect travellers from "rebels and outlaws".
The closure will last until security forces along the border are reorganised.
The statement did not mention the presence of Mr Ibrahim in Libya.
Sudan's government has asked Libya to expel him, possibly to force him to resume peace talks in Doha.
He was last month refused entry into Chad from Libya.
There has been a recent upsurge in fighting in Darfur after a relative lull.
About 600 people died in fighting in Darfur in May, the highest monthly toll since UN peacekeepers were deployed in 2008.
Most of the fighting was between Mr Ibrahim's Justice and Equality Movement (Jem) and Sudan's army.
Jem has pulled out of peace talks with the government, accusing it of acting in bad faith.