BIR AYAD, Libya – Rebels launched a new offensive Saturday out of their stronghold in Libya’s western mountains, battling regime forces in a drive toward the heartland of Moammar Gadhafi’s rule on the Mediterranean coast.

Opening a new front, the rebels are aiming to break a monthslong deadlock and eventually fight their way to the capital, Tripoli.

Booms of shelling and rocket fire echoed from the front lines, centered around the town of Bir Ghanam, where the rebel force backed by tanks fought Gadhafi’s troops for much of the day.

Rebels are hoping for a breakthrough in the far west of Libya, frustrated with the stalemate in the center of the country, where their underequipped forces have been unable to budge the battlelines despite five months of NATO airstrikes on Gadhafi’s military. Rebels control most of the eastern half of country, while Gadhafi’s regime holds most of the west, centered around Tripoli.

At dawn, thousands of opposition fighters pushed out of the Nafusa Mountains, a range near the Tunisian border, into the coastal plain toward their main objectives, Zawiya and Sabratha, two key regime-held towns on the Mediterranean west of the capital. Bir Ghanam, one of their initial targets Saturday, lies a little more than a third of the 50-mile distance to Zawiya.

Rebel commander Col. Jumma Ibrahim said opposition forces had captured Bir Ghanam and had moved a few miles beyond it, as well as making advances on a separate highway to Sabratha.

“Now he can only defend himself against us,” Ibrahim said of Gadhafi. “Our main destination is Tripoli, but we cannot jump directly to Tripoli. We go one by one.”

Despite the ambitious goals, the new assault is certain to hit tough resistance, as it would push right into the heartland of Gadhafi’s control. Zawiya, the rebels’ main target on the coast, was the scene of a major uprising by anti-Gadhafi protesters early in the conflict. The protesters took over the city and drove out regime supporters, but then were brutally crushed in a long, bloody siege.

At a forward medical clinic in the hamlet of Bir Ayad, south of Bir Ghanam, doctors rushed to stabilize wounded fighters coming back from the front, as other rebels rested from the battle. Medical officials said five rebels and three regime soldiers had been killed in the fighting.

Rebel gunmen burst out with shouts of “God is great,” and mobbed a pickup truck that pulled into Bir Ayad carrying a captured Gadhafi solider. Two rebels shouted at the fighters not to harm him, though a civilian slapped him on the back of the head.

The soldier, clearly terrified with tears streaming down his face, was wrapped in a blanket and driven away.

At least three other captured soldiers were brought in later. One of them, Mohammed Tammar, his legs tied and his pants soaked with blood from a leg wound, appealed to the rebels around him, saying Gadhafi had misled his troops, telling them they were fighting NATO and al-Qaida. He and another captured soldier were taken to the rebel stronghold of Zintan in the mountains for interrogation, while a third, with a heavy wound in his back, was taken to a hospital.

Rebel fighter Moussa Hneish said his troops were trading tank fire with regime forces on a separate highway, heading for Sabratha, and had some of the Gadhafi troops surrounded. Ibrahim, the rebel spokesman, said troops eventually also moved forward a few miles along that highway.