National Transitional Council (NTC) forces have reached the coast near the city of Sirte, cutting off the last remaining land escape route for forces loyal to deposed Libyan leader Muammar Gaddafi and isolating them in two remaining pockets inside the city.
Sirte, Gaddafi's hometown, has become the key battleground in the NTC's final push to control the country.
Though the town of Bani Walid, south of the capital Tripoli, remains in loyalist hands, NTC leaders have said they will declare Libya liberated once Sirte falls.
Al Jazeera's Tony Birtley, reporting from close to the frontline, said that fighters had "punched through the last line of defence", a wall surrounding the heart of the city, and were within 200 metres of the centre.
The fighters had so far encountered light resistance and suffered no casualties but the fighting ahead was much more intense, our correspondent said.
The remaining Gaddafi loyalists were staging a fierce rearguard action and had "a lot of ammunition and a lot of resolve", Birtley said.
The advancing fighters had found a lot of discarded weapons and uniforms and had captured a number of black Libyans who said they were civilians.
But NTC fighters believed they were Gaddafi soldiers, Birtley said.
"This is a heartland of Gaddafi's support but that now is crumbling. The hold they have on Sirte is crumbling by the minute."
Earlier, Abdul Salam Javallah, commander of NTC units from eastern Libya, told the Reuters news agency that Gaddafi forces inside the Mediterranean city were cornered in two neighbourhoods near the sea.
"We are dealing with them now with light weapons because there are still families inside," he said.
There are fears the fighting could breed long-term hostility, making it hard for the NTC to unite the vast North African state once the conflict is over.
Key locations fall
NTC forces in Sirte have already captured several of the city's strategic locations including the main hospital, the university and the Ouagadougou conference centre, and on Tuesday said they had also taken the city's police headquarters.
But the protracted battle for Sirte has raised concerns about many civilian casualties.
Desperate civilians were still trying to flee the fierce street clashes as fighting continued but that made it hard for advancing fighters to positively identify civilians from opposition fighters, Birtley said.
With Tripoli, the capital, and most of the country already under their control, NTC leaders have said that they will declare Libya "liberated" when Sirte falls.
Mustafa Abdul Jalil, the NTC chairman, visited fighters in Sirte on Tuesday, standing on the back of a truck as they shouted "Libya, Libya!" and fired their weapons into the air in celebration.
Earlier, Jalil met Canada's top diplomat in Tripoli to reopen its embassy and announce funding to help the council secure weapons stockpiles.
John Baird, the foreign affairs minister, travelled in an armoured convoy to meetings in Libya's capital, accompanied by fellow officials and business leaders seeking to restore trade ties with the oil-rich nation.
"Our government remains committed to protecting the Libyan people and supporting their efforts to build a brighter future for themselves," Baird said in a statement.
NATO said the fall of Gaddafi’s hometown would mark an "iconic" moment in Libya but would not spell the end of its air campaign, according to the alliance's top military officer.
Giampaolo Di Paola, the chairman of the NATO military committee, told AFP that Gaddafi loyalists were like a "cornered beast".
"When the ferocious beast is cornered, she will fight until the end," Di Paola said in an interview at NATO headquarters. "On the one hand, yes, I am surprised by their capacity to resist but, on the other hand, they have no other choice."
Sirte has become one of the final bastions, along with the desert city of Bani Walid, for Gadddfi forces, two months after the NTC took control of Tripoli.
Gaddafi has not been seen since the fall of the capital, and the location of many of his inner circle including several of his sons remains unknown.