Three attackers were killed and two UN soldiers were wounded, he said.
A more than 10,000-strong UN force is being deployed to lawless southern Sudan to monitor the implementation of a peace deal signed last year to end Africa's longest civil war.
But the Ugandan rebel Lord's Resistance Army (LRA), which has sought refuge in neighbouring lawless southern Sudan for years, has increased attacks on civilians in recent weeks as their supply lines have been cut off by the cessation of hostilities in the south.
The attack on a UN building in Yambio, near the border with the Democratic Republic of Congo (DRC), on March 19 injured two Bangladeshi UN troops and three of the attackers were killed, said new UN force commander Jasbir Singh Lidder.
"Two of our soldiers got wounded, three attackers went in...from their features we have reason to believe that these were from the LRA," Lidder said.
The International Criminal Court issued its first arrest warrants for five LRA commanders last year. The group, which had large bases in the wild south Sudan region, then broke up into small groups and moved west, terrorising civilians on their way.
The attack is the latest in a spiral of violence in southern Sudan, where a bitter north-south civil war claimed two million lives, mostly from famine and disease.
Earlier this month, a government-allied militia ambushed former southern rebel troops in the central oil region of Abyei, killing around 12 and injuring more than 20 with many still missing.
Lidder said the government was refusing to allow the United Nations to be involved in an investigation into the attack for reasons he said he could not understand.
"I feel this is a cease-fire violation and the UN has to be a party to the investigation," he told reporters in Khartoum. "Then only the investigation will be credible, acceptable, transparent."
The former southern rebel Sudan People's Liberation Army/Movement (SPLA/M) agree the UN should lead the investigation into the attack, which was the first fatal clash between the former foes since the deal was signed in January 2005.
(c) Reuters 2006. All rights reserved. Republication or redistribution of Reuters content, including by caching, framing or similar means, is expressly prohibited without the prior written consent of Reuters. Reuters and the Reuters sphere logo are registered trademarks and trademarks of the Reuters group of companies around the world.