Civilians have been fleeing the fighting in the north-east
Uganda has warned Rwanda against fighting a "proxy war" in the Democratic Republic of the Congo.
This follows a Rwandan threat to send its troops back into DR Congo unless Uganda also withdrew.
Tension has been mounting following fighting in and around the north-eastern town of Bunia, where Uganda sent reinforcements after driving a small rebel group out of the town.
The former allies have already clashed on several occasions on Congolese territory during the five year DR Congo conflict.
The BBC's Mark Dummett in the Congolese capital, Kinshasa, says that the Congolese are alarmed that the drums of war are sounding just as the organisers of the Congolese peace process announced a "final ceremony" for the end of the month.
"If Rwanda attacks us directly we shall fight them ourselves," said Ugandan Defence Minister Amama Mbabazi in a statement.
"If they attack us using proxies, we shall fight those proxies," he said.
DR CONGO'S WAR
Seven foreign armies
At least 2 million dead
Disease and abuses widespread
He also accused Rwanda of helping Ugandan rebels prepare attacks.
Rwanda made similar accusations against Uganda last week.
Rwanda withdrew its forces from DR Congo last October following a peace deal with the Congolese Government.
The United Nations allowed Uganda to keep some 1,000 troops in Bunia in order to keep the peace between local militias and rebel groups.
"If the international community has found it acceptable for Uganda to return to the DRC, for all the dubious reasons it has given, then it is legitimate that Rwanda should go into the DRC to contain this new situation," Rwanda's foreign ministry said in a statement.
Congolese Foreign Minister Leonard She Okitundu condemned Rwanda and Uganda for preferring to fight each other inside DR Congo, rather than across their common border.
He also told the BBC's Network Africa that Rwanda had never withdrawn all its troops from Congolese territory.
The fighting in Bunia also threatened the signing of a deal to end the five-year war in DR Congo.
But the Rwanda-backed RCD-Goma group agreed to take part in a power-sharing government and a new unified army.
More than two million people are believed to have died as a result of the war which began in 1998, and at one stage dragged in half a dozen foreign armies.