They also battled to loosen the grip of rebels on two cities close to Tripoli. But in at least one case, their tactics appeared to lead them into a trap.
Residents said pro-Gadhafi troops punched into the city of Misrata, 120 miles (200 kilometers) east of Tripoli, the capital, with mortars and tanks but were pushed out five hours later by rebel forces. The rebel commanders intentionally opened the way for government tanks to enter the city, then surrounded them and attacked with anti-aircraft guns and mortars, said Abdel Fatah al-Misrati, one of the rebels.
"Our spirits are high," al-Misrati said. "The regime is struggling and what is happening is a desperate attempt to survive and crush the opposition. But the rebels are in control of the city."
As fighting across Libya grew more fierce, the international community appeared to be struggling to put military muscle behind its demands for Gadhafi to give up power.
A small British delegation sent to talk to the rebels headquartered in the main eastern city of Benghazi, meanwhile, was arrested by the rebels themselves, who said the group had entered the country without permission. The rebels have set up an interim governing council that is urging international airstrikes on Gadhafi's strongholds and forces, though they strongly oppose foreign intervention on the ground.
Sunday's fighting appeared to signal the start of a new phase in the conflict, with Gadhafi's regime unleashing its air power on the rebel force trying to oust the ruler of 41 years. Resorting to heavy use of air attacks signaled the regime's concern that it needed to check the advance of the rebel force toward the city of Sirte - Gadhafi's hometown and stronghold.
Anti-Gadhafi forces would get a massive morale boost if they captured Sirte, and it would clear a major obstacle on the march toward the gates of Tripoli.
The uprising against Gadhafi, which began Feb. 15, is already longer and much bloodier than the relatively quick revolts that overthrew the longtime authoritarian leaders of neighboring Egypt and Tunisia.
Libya appears to be sliding toward a civil war that could drag out for weeks, or even months. Both sides seem to be relatively weak and poorly trained, though Gadhafi's forces have the advantage in numbers and equipment.
The conflict took a turn late last week when government opponents, backed by mutinous army units and armed with weaponry seized from storehouses, went on the offensive. At the same time, pro-Gadhafi forces have conducted counteroffensives to try to retake the towns and oil ports the rebels have captured since they moved out of the rebel-held east.
An opposition force estimated at 500 to 1,000 fighters pushed out of the rebel-held eastern half of Libya and has been cutting a path west toward Tripoli. On the way, they secured control of two important oil ports at Brega and Ras Lanouf.
If the rebels continue to advance, even slowly, Gadhafi's heavy dependence on air power could prompt the West to try to hurriedly enforce a no-fly zone over the country. The U.N. has already imposed sanctions against Libya, and the U.S. has moved military forces closer to its shores to back up its demand that Gadhafi step down.
Enforcing a no-fly zone could take weeks to organize, however, and U.S. Defense Secretary Robert Gates has noted that it must be preceded by a military operation to take out Libya's air defenses.
British Foreign Minister William Hague said Sunday that a no-fly zone over Libya is still in an early stage of planning and ruled out the use of ground forces.
Hague also said a small British diplomatic team sent to Libya to try to talk to the rebels left after it "experienced difficulties," but that another team would be sent. He told the BBC it would be inappropriate to comment on an article in Britain's Sunday Times that soldiers were captured by rebel forces when a secret mission to put British diplomats in touch with leading opponents of Gadhafi went awry.
Abdel-Hafidh Ghoga, spokesman for the rebels' provisional transitional national council, said eight people with British passports were arrested, including one who claimed to be a British diplomat. He said their departure was being arranged, and that they have "probably already left."
"The reason they were arrested is because they came into the country unofficially without previous arrangement with Libyan officials. Libya is an independent nation, and we have our borders that we expect to be respected," Ghoga said.
He added that there is "no crisis" between the council and Britain and that anti-Gadhafi forces are "more than willing" to talk to any delegation sent "in a legitimate way."
Hundreds if not thousands of people have died since Libya's uprising began Feb. 15 - tight restrictions on media make it near impossible to get an accurate tally. More than 200,000 people have fled the country, most of them foreign workers. The exodus is creating a humanitarian crisis across the border with Tunisia - another North African country in turmoil after an uprising in January that ousted its longtime leader.
The turmoil is being felt more broadly still in the form of rising oil prices. Libya's oil production has been seriously crippled by the unrest.
On Saturday night, the rebels pushed to just 20 miles (30 kilometers) east of Sirte, but then pulled back about 90 miles (150 kilometers) to the town of Ras Lanouf for the night.
That night, pro-Gadhafi forces infiltrated the town of Bin Jawwad, on the road to Sirte, and set an ambush for the rebel forces when they returned at daylight. They also came under a barrage of fire from helicopter gunships, artillery and rockets.
Associated Press reporters at the scene saw fierce battles raging throughout the day.
"We got thrown by bombs and snipers from the side roads that we can't see," recalled Jamal al-Karrari, a Libyan who abandoned his studies in the U.S. to join the uprising. "I didn't even use my Kalashnikov; I didn't find a target. All we were trying to do was escape and come back."
The rebels staged several offensives throughout the day, while unarmed spectators, many decorated with the rebel flag, cheered them on from the road. Each advance, however, was met with a withering barrage of cannon fire that threw the rebels back. The government also launched airstrikes against Ras Lanouf.
About 50 rebel fighters were trapped inside a Bin Jawwad mosque, and their comrades who had retreated to the edge of the city suddenly surged forward in 20 pickup trucks to try to rescue them.
They drove straight into the bombardment and one of the trucks was hit, sending a huge plume of black smoke into the air. The rest of the convoy quickly retreated back to the edges of the town.
Rebel soldier Musa Ibrahim said Gadhafi's forces took hostages in the town in the morning.
"They took one of every family hostage to keep them from fighting," he said.
During the fighting, ambulances sped east toward a hospital in Ras Lanouf while rebel trucks, at least four of them mounted with multiple rocket launchers, raced west to reinforce the front lines.
Hospital officials said six people were killed in the fighting for Bin Jawwad and 60 were wounded, including a French journalist for France 24 TV.
In Misrata, a city about halfway between Tripoli and Sirte, residents said the rebels repelled a government counteroffensive to seize back control.
The regime forces attacked just before noon with tanks, mortars, artillery and anti-aircraft guns. A heavy gunbattle raged for about five hours and residents said they were choking on the smoke that clogged the air.
Abubakr al-Misrati, a doctor at a Misrata hospital, said 20 people were killed, 14 of them from Gadhafi's forces, and 100 injured.
Tripoli, the capital of 2 million, is the city most firmly in Gadhafi's grip. Residents there awoke before dawn to the crackle of unusually heavy and sustained gunfire that lasted for at least two hours. Some of the gunfire was heard around the sprawling Bab al-Aziziya military camp where Gadhafi lives, giving rise to speculation that there may have been some sort of internal fighting within the forces defending the Libyan leader inside his fortress-like barracks. Gadhafi's whereabouts were unknown.
Libyan authorities tried to explain the unusually heavy gunfire by saying it was a celebration of the regime taking back Ras Lanouf and Misrata, though both places appeared to still be in rebel hands.
After the gunfire eased in the early morning, thousands of Gadhafi's supporters poured into Tripoli's central square for a rally that lasted all day, waving green flags, firing guns in the air and holding up banners in support of the regime. Hundreds drove past Gadhafi's residence, waving flags and cheering. Armed men in plainclothes were standing at the gates, also shooting in the air.
Khaild Kaid, deputy foreign minister, claimed the government now held the cities of Ras Lanouf, Misrata and Zawiya, though rebels and residents said all were held by Gadhafi's opponents.
Kaid said government forces arrested 37 rebels. He said that Zawiya's rebels have used their families as human shields and that the army decided not to attack them.
Zawiya, just 30 miles west of Tripoli, is the closest rebel-held city to the capital. Residents there said pro-Gadhafi forces entered with tanks, anti-aircraft guns and mortars Saturday but retreated after a three-hour battle, and that rebels seized some of the troops' weapons and equipment. They said pro-Gadhafi forces had withdrawn to the outskirts of the city and were bracing for a new offensive. Most of the residents interviewed spoke on condition of anonymity for fear of reprisals.
"At the beginning (of fighting), our weapons were rudimentary.
But every time they attack us, we seize their weapons," one rebel fighter said. He also said opposition fighters took hostages and shot and killed at least 10 of them in a hotel near the square.