South Sudanese President Salva Kiir finished a two-day visit to Sudan on Thursday in which he met Sudanese President Omar al-Bashir.
It was Kiir's first visit to the country since 2015.
The leaders announced they had reached a new agreement concerning the two country's contested borders and how to stem the flow of weapons to rebel groups at war with governments in the border regions.
The enforcement at border crossings has been lacking due to fighting in the areas of Darfur and Kurdofan.
Sudan's president Omar Al-Bashir said that he hoped that the measures might help bring the country's nearly four-year-old civil war in the Darfur and South Kordofan region to an end.
South Sudan has been plagued by fighting since 2013, just two years after a popular referendum resulted in the country's independence from Sudan.