Members of the right-wing Likud Party voted 1,433 to 1,329 - a margin of 104 votes - against a proposal by Sharon's opponents to move up the date of party primaries to November. The results, announced by the party, mean the primary will be held on schedule next spring, as Sharon wanted.
The vote, which Sharon won 52 percent to 48 percent, was seen as a referendum on his leadership of Likud, the party Sharon helped found more than three decades ago. Led by his main rival, Benjamin Netanyahu, party hard-liners have accused Sharon of abandoning the Likud's nationalist roots by withdrawing from Gaza.
Netanyahu, who had wanted an early primary to capitalize on anger over the Gaza withdrawal, conceded defeat but said Sharon cannot ignore the strong opposition against him within the party. Despite the setback, Netanyahu said he still planned to run in next spring's primary in an effort to oust Sharon.
"We lost by a very few votes. There is a very large camp that went against the flow, against the wind, against the pressure, against the leadership and against the temptations," said Netanyahu, a former prime minister.
Polls in recent weeks had shown Netanyahu with double-digit support among Likud voters, and a recent barrage of rockets launched at Israel by Palestinian militants had been expected to further bolster Sharon's opponents. Netanyahu has repeatedly warned the Gaza pullout would encourage Palestinian violence.
In response to the rocket attacks, Israel launched a wide-ranging offensive against militants across Gaza and the West Bank over the weekend.
Early Monday, Israeli aircraft attacked suspected weapons factories around Gaza City as well as the southern Gaza towns of Rafah and Khan Younis. The air strikes knocked out power to the eastern part of Gaza City and caused damage to several buildings, but no injuries were reported.
The army said its targets included an access road leading to a rocket-launching site in northern Gaza, weapons-manufacturing factories and storage facilities belonging to militant groups.