* M23 rebels confined to hills near Uganda, Rwanda border
* Army says cannot let rebels reorganise after towns seized
* Ugandan mediators see deal brokered soon at Kampala talks
Congo's army said on Thursday it was hunting rebels deep in the forests and mountains along the border with Rwanda and Uganda, the insurgents' last hideouts after they were driven from towns they seized during a 20-month rebellion.
Peace talks between the government and M23 rebels resumed on Wednesday in neighbouring Uganda but Congo's army appeared intent on crushing the most serious uprising in its mineral-rich east since a war ended a decade ago.
"We're going to pursue M23 and push them into a corner, wherever they hide, because they are criminals," army spokesman Colonel Olivier Hamuli said. "They have martyred the Congolese people for too long. Now is the time to bring peace."
Artillery and small arms fire rang out on Thursday in the hills around Bunagana, a border town which the army retook the previous day, a Reuters reporter said. Clashes were also reported around Runyoni, the birthplace of the rebellion.
M23 officials said they had withdrawn from a string of towns over the last week due to diplomatic pressure. M23's political leader, Bertrand Bisimwa, told French radio RFI the military losses would not alter rebel demands at the Kampala talks.
M23, led by ethnic Tutsis, took up arms last year accusing Kinshasa of failing to honour a 2009 peace deal to end a previous uprising. Eastern Congo has been caught up in a cycle of violence, exacertabed by the presence of rival ethnic militias and simmering disputes over land and minerals.
At their peak in November, M23 swept past U.N. peacekeepers to occupy the regional capital Goma after the army fled. That defeat led to U.N. forces being bolstered, Congo's army overhauled and neighbouring countries pressured not to meddle in the conflict, changing the tide of events.
"The M23 may be nearing its end," wrote Jason Stearns, a Congo expert. "This would be historic. It would be the first time the Congolese government had defeated a major rebellion."
"And it would be the first time since 1996 that an armed group allied to Rwanda is not present in the eastern Congo."
U.N. experts and human rights groups have accused Rwanda of backing M23. In the wake of its 1994 genocide, Rwanda, repeatedly sent its army into Congo on the pretext of hunting Hutu rebels who fled there after the massacres.
Kigali has strongly denied any support for M23 but the United States and Great Britain still suspended aid last year.
Stearns said public and private pressure from world powers for Rwanda to remain out of Congo's conflict played a key role.
British Foreign Minister William Hague called Rwandan President Paul Kagame on Friday to urge restraint, a foreign office spokesman said. Rwanda warned last week it could retaliate after shells landed on its territory.
Residents poured into the streets of Bunagana on Wednesday to welcome the army, better known for its chaotic command than military prowess.
"We never imagined that one day we would be liberated by the army," said a resident of Bunagana, where rebels had levied taxes on cross-border trade to finance their forces. "We lived in terror. We were traumatised."
Some of the 8,000 refugees who fled to Uganda on Wednesday had begun returning home, a U.N. official and a resident said.
Diplomats say a political deal is needed alongside the military gains to ensure frustrations over Kinshasa's handling of the remote region did not spark a fresh uprising.
After the last uprising ended in 2009, rebels were integrated into the army but maintained parallel command chains.
M23 has said it would disarm if Congo's army and U.N. peacekeepers crushed the Rwandan Hutu FDLR rebel group, some of whom have been based in Congo since Rwanda's genocide.
"The problem is the FDLR have been working with Congo's army, so where do you start?" said Victor Ngezayo, a Tutsi businessman, underscoring the complex ties in the zone.
Lieutenant Colonel Paddy Ankunda, spokesman for Uganda's mediation team, said progress was being made at talks though questions remained over an amnesty for the rebels.
Fatou Bensouda, prosecutor of the International Criminal Court, on Wednesday said she might broaden investigations into crimes in Congo. U.N. peacekeepers have confirmed they are investigating reports of mass graves in areas vacated by rebels.