TRIPOLI, Libya – Two children and their parents were killed by machine-gun fire Saturday while trying to flee Moammar Gadhafi’s hometown along with hundreds of other residents, as forces loyal to the ousted regime engaged in heavy clashes with revolutionary fighters surrounding the city.

Their bodies were brought to a makeshift hospital outside Sirte, said a doctor there, Nuri Naari. They were hit by machine-gun fire as they drove toward the positions of revolutionary forces on the edges of the city, he said. It was unclear who killed them.

Sirte is one of the last cities to remain in loyalist hands. After months of stalemate in Libya’s civil war, anti-Gadhafi forces swept into the capital in August and their leaders set up a transitional government. But the continued fighting in holdout cities and the failure to find and capture Gadhafi has kept Libya’s new leaders from being able to declare victory.

Revolutionary forces had given families inside Sirte two days to leave the city starting Friday, said Mustafa Abdul-Jalil, head of the National Transitional Council that now runs the country. They tried to keep a safe corridor open for civilians fleeing the coastal city.

“This period will give a chance for families to leave the areas of fighting,” he said at a press conference Saturday.

Hundreds of cars carrying Sirte residents formed long lines at revolutionary forces’ checkpoints leading out of the city, calmly waiting to be checked by the fighters as explosions echoed in the distance.

After weeks of fighting Gadhafi’s loyalists inside Sirte, the fighters now hold positions about three miles from the city center, said commander Mustafa al-Rubaie.

Last week, the Libyan Defense Ministry announced that Sirte’s port, airport and military base were all under their control.

Al-Rubaie said that fighters from the east seized control of Sirte’s first residential district and a hotel where Gadhafi’s snipers were based.

“There is heavy fighting going on in the streets of Sirte right now,” he said. “The enemy is besieged from the south, east and west, but it’s still in possession of highly sophisticated weapons and a large amount of ammunition.”

Al-Rubaie said Gadhafi forces were also in control of strategic positions inside the city, including high-rise buildings where snipers are positioned, making the revolutionary forces’ advance slow and hard.

“The plan is that the eastern and western forces will meet in the middle of Sirte,” al-Rubaie said. “When we reach this point, we will celebrate the liberation of Sirte.”