Khartoum, Sudan - South Sudan's President Salva Kiir has arrived in Sudan to meet the president on a two-day trip aimed at resolving border disputes and discussing security issues.

Kiir was welcomed by his Sudanese counterpart Omar al-Bashir on Wednesday, according to AFP news agency.

South Sudan gained independence from Sudan in July 2011 after more than two decades of civil war, the longest-running conflict in African history.



"There are a lot of agreements between us (Sudan and South Sudan), and now we have agreed to start implementing those agreements as they were signed," Awad bin Auf, Sudan's defence minister, told reporters after a meeting with an advance team from South Sudan on Sunday.



"We have previously agreed to opening 10 border crossings between the two countries, and we will start by opening four crossings ... We have (also previously) agreed on a 20km demilitarised zone - 10km from each side," Bin Auf added.

{articleGUID}

Relations between the two nations have improved over the past few months.



Only a year ago, Sudan was accusing South Sudan of hiding and harbouring Sudanese rebels on its soil. South Sudan also accused Khartoum of harbouring rebels which had been fighting the government in a civil war since 2013.



Both said their respective rebels were on the others' border, crossing to their homeland to fight and retreating into the host nations.



In 2012 - less than a year after South Sudan's independence - South Sudan invaded Sudan's oil-rich area of Heglig, making border security a contentious issue between the two countries.



South Sudan said the invasion came after provocations from Sudan, as skirmishes between forces from the two sides regularly occurred along the nearly 2,000km border.



A joint border monitoring mechanism has already been agreed upon, but with more than 50 percent of the border still under dispute, the implementation of the mechanism has been delayed. The process of demarcating the border is ongoing, with discussions mediated by the African Union in Addis Ababa.



Abraham Mamer, a South Sudanese analyst, said the two countries, as result of their common history, remain deeply intertwined.



"If they don't work together, there will be chaos, and there will be instability in the region. South Sudan must be stable for Sudan to be stable, and Sudan must be stable for South Sudan's stability," Mamer said.

{articleGUID}

The two countries, despite the 2011 secession, still rely on the same source of revenue: oil - specifically, South Sudan's oil, which accounts for 98 percent of its revenue.

However, oil-producing South Sudan lacks the infrastructure to process its production. It is landlocked, forcing the young nation to use pipelines that go through Sudan to export its oil to the international market.



As disagreements over the charges for using the pipelines escalated in 2012, South Sudan shut down its oil production, accusing Sudan of stealing its shipments.



Sudan stated that it was only exercising its right, pointing to South Sudan's failure to pay for the use of its pipelines and processing facilities. The two later agreed on a fixed rate for the use of the facilities.



"We will be having joint security for the oil fields so that workers can resume production in former Unity state, in Ruweng and Northern Liech states," Ezekiel Lol Gatkuoth, South Sudan's minister of petroleum told Al Jazeera.



"There will be workers from Sudan coming to South Sudan, and they will need to be protected so both sides will form a joint security force."

{articleGUID}

South Sudan's civil war has resulted in the destruction of the country's northern oil fields, cutting down production to nearly a third, down from 350,000 barrels a day before the war.



This has weakened South Sudan's economy as well as Sudan's, which relies on the processing and transportation fees for more than half of its gross domestic product (GDP).



Other points of disagreements between the two countries, such as the disputed area of Abyei, will not be discussed, according to a South Sudanese presidential aide, saying that this was to not further complicate the agenda.