An unidentified group fired a heavy barrage of mortar fire late on Sunday at both consulates. British troops raced to the scene and fired at the source of the shelling.
No casualties or damage have yet been reported.
The mortar attack in Basra comes at the conclusion of a particularly bloody day which saw the killing of 25 Iraqi guardsmen, marking the deadliest attack of its kind in nearly four months.
Iraqi journalist Usama al-Samarrai, quoting official sources, told Aljazeera that a bus was transporting 25 guardsmen and they were all killed in Sunday's attack.
The blast, which was caused by a car bomb, took place near the Iraqi National Guard (ING) headquarters close to the US military base in Balad, 60km north of Baghdad, he said.
Al-Samarrai described the explosion as very loud, adding that its impact left a large crater on the road.
Attacks of this kind are occurring frequently as the 30 January election date draws near, he said, pointing out that another car-bombing took place barely a few days ago killing many Iraqi policemen in the Salah al-Din governorate.
He said ING headquarters and US military bases are under daily assault, with attendant loss of lives.
Iraqi guardsmen are regarded by
anti-US fighters as collaborators
Also on Sunday, in Baghdad city, a US Humvee was destroyed when fighters launched a rocket-propelled grenade attack at a US military patrol in a southwestern suburb.
And in al-Kadhimiya area, northeast of the capital, an Iraqi guardsman was killed by anti-government fighters.
In other developments, a fire broke out at an oil pipeline when an explosive device, planted by unidentified men, went off in al-Fatha area, north of Baiji city.
And in Kirkuk, a number of Westerners were injured when an explosive device targeted their car in al-Sinai (industrial) neighbourhood, north of the city.
Earlier, Master Sergeant Robert Powell, a US military spokesman in Tikrit, said 18 Iraqi guardsmen, one Iraqi civilian and the driver of the vehicle were dead and 11 more guardsmen wounded.
Oil installations in remote areas
are highly vulnerable to attacks
Sunday's attack was the most lethal in four months. In September 2004, at least 47 people were killed outside a Baghdad police station.
Fighters have killed hundreds of security forces members since the US-led invasion in 2003, prompting many Iraqis to wonder how police and guardsmen will be able to protect voters when they can barely protect themselves.
US and interim Iraqi government officials ushered in the New Year with warnings of a spike in pre-election assaults by groups trying to drive out US-led forces and topple Iraq's Washington-backed government.