ISLAMABAD, Pakistan — The party of former Prime Minister Nawaz Sharif announced Sunday that it would participate in Pakistan's parliamentary elections next month after failing to convince rival Benazir Bhutto to join a boycott.

Greater participation will make the balloting look more open, bolstering President Pervez Musharraf's democratic credentials, which took a hit over his Nov. 3 declaration of a state of emergency and his dismissal of independent-minded judges.

But having by the opposition in the field also will siphon votes and seats from Musharraf's party, weakening the U.S.-backed leader.

While some parties still say they won't participate in the Jan. 8 polls, the prospect of a general opposition boycott has now collapsed with decisions by the two largest opposition groups to field candidates.

The All Parties Democratic Movement, comprised of 33 parties and political groups led by Sharif's Pakistan Muslim League-N, met Sunday to cobble together a joint stance.

Sharif had hoped to convince Bhutto to have her Pakistan People's Party join a boycott, but she said Thursday that her supporters would participate, and five hours of debate yielded only agreement to disagree on the boycott, which the parties tried to paper over by saying they are committed to fighting Musharraf.

At the end of the talks Sharif's party announced its participation. The other groups will decide on their own whether to stay away.

"Since we could not reach any agreement with People's Party and they are contesting polls, we cannot leave the field open," said Ahsan Iqbal, spokesman for Sharif's party.

Still, in the current volatile political environment, last-minute snags remain possible, with several opposition leaders claiming the government is preparing to rig the vote.

The right-wing Jamat-e-Islami party, several nationalist parties and the party of former cricket star Imran Khan were still pressing for a boycott.

"By going to the polls, in fact we will give legitimacy to Pervez Musharraf and his illegal acts," said Syed Munawar Hasan, secretary general of Jamat-e-Islami.

Musharraf said Sunday that he guaranteed the elections will be "free and fair."

"We haven't even gone for elections and they are talking of rigging and everything," the former army general told CNN in an interview. "This is a clear indication of their preparation for defeat. Now when they lose, they'll have a good rationale, that it is all rigged, it is all fraud. In Pakistan, the loser always cries, and that is an unfortunate part."

The president, who left his army position last month, eight years after taking power in a coup that ousted Sharif, said he will lift the emergency next weekend.

A large boycott would have undermined Musharraf's efforts to legitimize the new presidential term he won in October in a vote by a Parliament stacked with his supporters. U.S. Ambassador Anne Patterson has repeatedly urged all opposition parties to take part in the elections.

Raja Zafarul Haq, chairman of Sharif's PML-N party, said Sharif will start trying to mobilize the masses by visiting Faisalabad, Karachi and other parts of the country in the coming days.

"This is the most effective way to pressure this government; to restore judges, restore the Constitution," Haq said.

Elsewhere, a suicide bomber killed eight people by ramming his explosives-laden car into a police outpost in the scenic northern valley of Swat, where government forces have been battling to regain control of towns lost to Islamic insurgents. It was the latest in a series of suicide attacks on members of the security forces in the past year.

Musharraf had cited the stepped-up militancy in northern regions like Swat in imposing the state of emergency — a move critics said was actually designed to silence opposition forces.

Associated Press writer Zarar Khan in Islamabad and Zia Khan in Lahore contributed to this report.