Sudan says its largest oil field is now controlled by South Sudan's army.
A Sudanese military spokesman told the BBC its forces had been defeated outside Heglig, and retreated north.
South Sudan said its forces had advanced to Heglig, but stopped short of saying its forces actually controlled the oil fields.
Clashes between the two sides started two weeks ago, and are among the worst since South Sudan gained independence last July after a long civil war.
South Sudan ended up with most of the oil fields, although it has to export the oil using pipelines through ports in Khartoum's territory.
Both sides blame the other for starting the latest fighting along the undemarcated and disputed frontier in the oil-producing Heglig area.
South Sudan's military spokesman, Philip Aguer, told the BBC the army was responding to air and ground attacks by the Sudanese armed forces.
A Sudanese government statement earlier described the offensive as "severe", saying its Heglig oil fields were deliberately targeted.
A Sudanese man who works in the oil industry, who did not want to be named, told the BBC that Sudan began the fighting.
Another source suggested the Sudanese were trying to regain a post on the disputed border they had lost two weeks ago.
Fighting 'poisoned atmosphere'
Col Khalid Sawarmi, the spokesman for the Sudan Armed Forces, said: "Now the [soldiers] from South Sudan they are inside Heglig city, and the oilfield, they conquered the Sudanese army outside of Heglig.
"The South Sudanese attacked our Sudanese army in Heglig, as you know Heglig is not part of South Sudan," he continued.
In January, South Sudan, which depends on oil sales for 98% of its revenue, shut down all of its oil fields in a row over the fees Sudan demands to transit the oil.
The BBC's James Copnall in the capital, Khartoum, says oil is at the heart of the disagreements between the two countries, and oil installations are increasingly being targeted militarily.
Nhial Deng, South Sudan's Foreign Minister, said the fighting had "poisoned the atmosphere" between the two sides.
"But we are committed to finding solutions through dialogue," he said. "I strongly believe Khartoum's stance is... to make military gains so they come to the table in a position of strength."
A presidential summit, which was to have been held in South Sudan's capital, Juba, at the beginning of April, has been postponed indefinitely because of the recent fighting.
African Union mediator Thabo Mbeki held talks late last week with South Sudan's President Salva Kiir and his Sudanese counterpart, Omar al-Bashir, amid international fears of a return to full-blown conflict.
Meanwhile, an international weapons monitoring group, Small Arms Survey, says it has gathered enough evidence to show that both South Sudan and Sudan are providing arms to rebels and militia groups in each other's territory.
Both sides have often made and denied such claims of support.