The Libyan government said Sunday that it had reopened a major highway from the capital to the Tunisian border after routing rebel fighters on the road near the strategic town of Zawiya.
But opposition spokesmen said fierce fighting continued inside Zawiya, the largest city between Tripoli and the Tunisian border and home to the nation's principal functioning refinery.
The clashes around Zawiya, just 30 miles west of Tripoli, were the most intense combat near the capital in several months.
The rebels, taking advantage of bombing runs by the North Atlantic Treaty Organization designed to protect civilians from government attack, are seeking to oust Moammar Kadafi, whose troops still control much of western Libya, including Tripoli.
The fighting in the Zawiya area raised the specter of the rebels cutting off the capital from its major lifeline to the outside world. NATO is enforcing both a no-fly zone and a limited blockade of Libyan ports, meaning many foodstuffs, fuel and other imports must be brought in by road.
Government officials sought to downplay the attack as a desperate ploy. "They are pathetic, they are weak, their numbers are in the dozens, not the hundreds," Musa Ibrahim, chief government spokesman, said Sunday of the rebels.
According to Ibrahim, a rebel force of not more than 100 attacked a checkpoint west of Zawiya early Saturday, killing a policeman and a soldier. The Libyan army then counterattacked, he said, capturing some rebels and killing others.
A government official said about a dozen rebels were killed.
As of late Sunday, Ibrahim said, a standoff continued at the scene while the regime sought to negotiate the surrender of the remaining rebel force.
But rebel officials based in the eastern city of Benghazi said fierce fighting was still raging in Zawiya late into the day.
Col. Ahmed Omar Bani, military spokesman for the Libyan opposition in Benghazi, said government forces were sweeping through Zawiya and nearby rural areas, killing anyone suspected of involvement with the rebels. He said more than 200 insurgents were involved in the attack.
The conflicting government and rebel claims were impossible for Western journalists based in Tripoli to verify.
Special correspondent Amro Hassan in Cairo contributed to this report.