(Updates with Mohan statement, Sadr official)
BAGHDAD, Oct 23 (Reuters) - Gunmen clashed with Iraqi security forces in the southern oil hub of Basra on Tuesday and freed a comrade from the main police headquarters during the fighting, an Iraqi security official said.
It was the first major test for Iraq's security forces in Basra since British troops withdrew in September to their main base outside the city as part of a plan to hand over Basra province to Iraqi control by the end of the year.
Iraq's volatile second city was described as calm but tense late on Tuesday after leaders of political parties held urgent talks with Major General Mohan al-Firaili, commander of Iraqi security operations in Basra.
There were no reports of any casualties from the fighting.
Basra has witnessed a turf war between rival Shi'ite groups, including supporters of cleric Moqtada al-Sadr, the powerful Supreme Iraqi Islamic Council and smaller Fadhila party, which controls the governorate.
"There has been a misunderstanding," said Haider Jaberi, a member of the Sadr movement's political committee. "Police arrested a member of the Mehdi Army and there were consequences. Now it has been resolved and he has been released."
Details of the fighting were sketchy, but it appeared to have started when a member of Sadr's Mehdi Army militia was stopped at a police checkpoint for a traffic violation and taken to police headquarters.
"After a little while a gang attacked the headquarters and armed confrontation ensued. As a result the gang managed to free the detainee," Mohan said in a statement.
Gunmen had then taken to the streets and clashed with Iraqi security forces, who were now back in control of the city.
A British military spokesman, Major Jamie Halford-Macleod said shots had been fired at the Shatt-al-Arab Hotel, local headquarters of the Iraqi security forces, in northern Basra, and at the provincial joint coordination centre.
"We maintain overall responsibility for Basra province and will respond as deemed necessary. Certainly there is no request from General Mohan for any assistance from us," he said.
The riverside city of more than 1 million people is strategically vital as the hub of southern oil fields that produce nearly all of the government's revenue and is the centre for imports and exports through the Gulf.
British forces are keeping a lower profile in Basra since pulling out of the city centre in September. British Prime Minister Gordon Brown said earlier this month that British forces in Iraq would be halved to 2,500 from spring next year.
Analysts fear that as British troops withdraw, the rival Shi'ite factions will intensify their battle for political supremacy, possibly drawing in neighbouring Iran.