Fighting between the Sri Lankan army and Tamil Tiger rebels in the north-eastern district of Trincomalee has spread.
Residents in the town of Muttur say the rebels have taken control of key areas in the centre, including the jetty.
Muttur is a predominantly Muslim town and thousands have taken shelter in mosques and school buildings, local people told the BBC's Tamil service.
The fighting comes amid an army offensive in Trincomalee district.
Despite the upsurge in fighting both sides still say they are acting defensively and therefore within the conditions of a 2002 ceasefire. Privately both also say they do not consider the recent violence to be the beginning of a full scale war.
Residents of Muttur told the BBC that the army had withdrawn from the town centre. Earlier the government said on its website that it was "in control" of the town but that "mortar fire is still happening".
It said rebels tried to capture the jetty in Muttur as 0130 local time. "The navy repulsed this attempt."
The rebels have shelled army positions in the latest attacks
The Tigers also launched attacks on four camps south and east of Muttur town.
Rebel spokesman Rasiah Ilanthirayan said they had made some progress. He told the BBC they were attacking "to protect our people from indiscriminate shelling" from the army.
The defence ministry said it had repulsed the attacks on the army camps.
Both sides have given widely differing accounts of casualties from Wednesday's fighting. The government says 40 rebels had been killed in the fighting around the army camps - there is no independent verification of the claims.
The BBC's Ethirajan Anbarasan says the fighting is escalating and it appears that the Tigers' counter attacks have surprised the military.
The latest fighting in Trincomalee district started eight days ago when the air force began bombing Tamil Tiger positions.
The government says the Tigers are stopping water in areas they control on the Maavilaru waterway from reaching tens of thousands of civilians in government controlled areas.
The Tigers say local people have closed a sluice gate in a dispute with the government over water supply improvements.
At least 23 soldiers have been killed since the army launched the offensive to the south of Trincomalee port. The Tigers say they have lost 25 fighters before Wednesday's fighting.
Up to 3,000 troops are involved in the efforts to gain control of the Maavilaru waterway, reports say.
The government has issued a statement saying it is committed to the ceasefire agreement - which analysts say lies in tatters.
"The government reaffirms its commitment to the ceasefire agreement," the statement said.
The government would continue its offensive against the rebels as long as they continued "acts of terrorism and violence", the statement added.
On Tuesday, the army said a ship - carrying more than 850 soldiers - came under attack from mortar and artillery fire as it was sailing from the northern Jaffna peninsula to the port of Trincomalee.
Four navy personnel had been killed in rebel mortar and artillery attacks following the attack on the ship, the army said.
The latest violence comes on the fourth day of a military ground offensive against Tamil Tiger rebels.
The BBC Colombo correspondent says that soldiers are trying to fight on heavily-mined land and that the offensive is going to be a difficult and slow process.
But the government is adamant they will resolve the issue militarily.
The Tigers have described the offensive as an act of war. One Tiger leader said that the country's 2002 ceasefire was now null and void.
The Sri Lanka Monitoring Mission (SLMM) has described the fighting as a "low-intensity war" and has warned that a full scale-war would be "disastrous" for both sides.
Sweden said on Tuesday it would pull out its staff from the SLMM by 1 September because of a lack of security guarantees from the Tigers.
The move follows similar announcements by Finland and Denmark. The Nordic-run SLMM was established to monitor the ceasefire between the government and the Tigers.