More than 30,000 people have fled DR Congo after a group of Ugandan rebels attacked a border town, says the UN's refugee agency, UNHCR.
The Allied Democratic Forces raided the town of Kamango on Thursday, according to the Ugandan army spokesman.
The Congolese national army has now retaken Kamango.
The ADF is based in mineral-rich eastern DR Congo, where numerous armed groups have caused havoc over the past two decades.
The huge number of refugees came in so quickly that the government and aid workers are still working out what to do, says the BBC's Catherine Byaruhanga in Bundibudgyo, on the Ugandan border with the DRC.
No food or adequate shelter has been distributed to the refugees. Many had to sleep out in the open in school compounds, or on the verandas of shops, she says.
The ADF was formed in 1996 by a puritanical Muslim sect in the Ruwenzori mountains of western Uganda.
In 1998 it increased its activities and a number of bomb blasts in markets and restaurants in Kampala were blamed on the group.
After years of sporadic raids, the Ugandan army almost destroyed the ADF's capacity in 2004 and it moved into DR Congo.
However, a United Nations report last year said the rebels had expanded their military capacity and established links with Somalia's al-Shabab militants.