* Bashir gives South Sudan final warning
* Juba denies supporting Sudanese rebels
* South Sudan needs pipeline to export oil via north
Sudan will close a pipeline carrying oil exports from South Sudan if Juba continues to support rebels operating on Sudanese soil, President Omar Hassan al-Bashir said Monday.
The long-time foes agreed to resume cross-border oil flows in March but relations have worsened in the past days over Sudan's accusations, which are denied by South Sudan.
Landlocked South Sudan, which became independent from the north in 2011, needs to use northern oil facilities to sell its crude and have any hope of propping up its moribund economy.
"I now give our brothers in South Sudan a last, last warning that we will shut down the oil pipeline forever if they give any support to the traitors in Darfur, South Kordofan and Blue Nile," Bashir told a large crowd in Khartoum, referring to insurgents operating in three Sudanese regions.
Bashir, wearing a military uniform and flanked by top officials for the televised speech, spoke after the army said it had seized back the town of Abu Kershola from the Sudanese Revolutionary Front (SRF), a grouping of rebels that wants to topple the veteran leader, in power since 1989.
In April, the SRF launched a major assault, briefly occupying Um Rawaba, a major city in central Sudan, before withdrawing. They held on to Abu Kershola, in neighbouring South Kordofan, home to most oil production in Sudan.
The SRF confirmed it had withdrawn from the town, saying it had done so to allow humanitarian aid to be delivered. The attack on Um Rawaba was the boldest rebel attack since they attacked Khartoum in 2008.
South Sudan reiterated it did not support the SRF, which says it wants to end what it calls a domination of Khartoum elites in the African country.
"Our president has said several times that we don't support any rebels in Sudan," said Information Minister Barnaba Marial Benjamin, urging Khartoum to address any bilateral problems through an African Union panel, which brokered the March deal.
"Any problem can be solved through dialogue. We are ready to continue the dialogue."
Sudan and South Sudan came close to all-out war in April 2012 and have struggled to put an end to tensions that have plagued them since the South seceded.
In March, the two countries struck a deal to resume cross border oil-flows and the first cargo arrived this month. But last week oil ministers from both countries were unable to agree whether a technical problem at a pumping station holding up flows had been solved, showing their enduring mistrust.
South Sudan shut down its entire oil production in January 2012 after tensions over pipeline fees and disputed territory escalated.