(Adds background, details)
* South Sudan seized oilfield briefly last month
* Sudan says oil started pumping on Monday
* Khartoum accuses foreigners of taking part in oil field destruction
HEGLIG, Sudan, May 2 Sudan said on Wednesday the Heglig oilfield, scene of intense fighting with South Sudan last month, has been repaired and has started pumping oil.
The two countries have been embroiled in weeks of fighting along their 1,800 km (1,200 mile) border, threatening to tip the region, which sits atop one of Africa's most significant oil deposits, into a full-blown conflict.
South Sudan's army, the SPLA, also said it killed 27 Sudanese army soldiers in a clash in Unity state on Tuesday.
But despite the persistent clashes in the border region, the two countries have so far stopped short of waging all-out war, with their positions now broadly the same as before the south seized Heglig.
South Sudan seized the contested Heglig oilfield, which is vital to Sudan's economy because it produced almost half of the country's output of 115,000 bpd, sparking widespread condemnation. It later withdrew from the oilfield.
"This oilfield was producing 55,000 barrels per day," Sudanese Petroleum Minister Awad Ahmed al-Jaz said at the oilfield, accompanied by oil engineers and military officers.
"Now as we said ... we plan to produce more than that, besides the production of other oilfields which will follow," he said, as he opened one the oil valves.
Jaz said the oilfield had started pumping oil at 10 p.m. (1900 GMT) on Monday. He did not indicate how much Heglig was currently producing.
"We can say the oil has now reached the Khartoum refinery."
Sudan lost three-quarters of its output when South Sudan became independent in July last year.
Both countries are at loggerheads over how much the southern landlocked nation should pay to export its crude through the north. The conflict has shut down nearly all oil production in the region, strangling both countries' oil-dependent economies.
In January, South Sudan shut down its entire output of 350,000 bpd to stop Khartoum taking some oil for what it calls unpaid transit fees.
Satellite images showed a key part of the oil infrastructure in Heglig was destroyed in the fighting. An earlier trip to Heglig showed damaged pipelines that were leaking oil.
On Wednesday, reporters saw pipelines that had been repaired, but which still bore the effects of damage.
Jaz said the power plant as well as rooms that manage the collecting, refining and storage of the oil had been damaged.
"Those who came here and saw the damage said that the repairs could not be completed in six months," Jaz told reporters taken on an official trip to the oilfield.
"Those who were optimistic suggested it would take four months to repair the damage. But the repair only took one week."
Jaz said four foreigners, whom Khartoum said they arrested on Saturday for illegally entering Heglig and for being spies for the SPLA, had "participated in the destruction".
The four, a Briton, South African, Norwegian and South Sudanese, are U.N.-affiliated workers.
The United Nations rejected the accusations.
"All four personnel were carrying out formal demining activities in Paryang, in Unity State," a spokeswoman for the U.N. mission in South Sudan, Josephine Guerro, said.
Heglig is operated by Greater Nile Petroleum Operating Co (GNPOC), a consortium of Chinese, Malaysia, Indian and Sudanese companies. Parts of the border area around the Heglig field in Block 2 are still in dispute.
South Sudan has agreed to an immediate end to hostilities in accordance with an African Union road map, which is meant to bring the former civil war foes back to the negotiating table.
But fighting along the border has continued.
The SPLA's spokesman, Philip Aguer, said the ground attack in Hofra on Tuesday, had later been accompanied by air strikes by a Sudanese Antonov and MiG-27 fighter jets.
"The SPLA killed 27 SAF soldiers, including a major that was commanding the force," Aguer said on Wednesday. "(The SPLA) ... captured five trucks mounted with heavy machine guns. They fled towards Heglig."
Sudan's army spokesman did not answer phone calls to verify the SPLA's claims.
Limited access to the remote border areas make it difficult to verify the often contradictory statements from both sides. (Additional reporting and writing by Yara Bayoumy; Editing by David Clarke and Giles Elgood)