ISLAMABAD, Pakistan - Pakistan will fight terrorism as its top priority but will also negotiate with militant groups "willing to lay down their arms," its new prime minister said Saturday.

Yousaf Raza Gilani, in his first policy speech, also said the government would seek to reinstate judges ousted by President Pervez Musharraf last year -- a move that could prompt a showdown with the U.S.-backed leader.

"We are confronting many challenges, but we are not afraid of these challenges, and we will face them," Gilani told lawmakers.

Parliament elected Gilani on Tuesday, six weeks after opposition parties triumphed in elections that have restored democracy after eight years of military rule under Musharraf.

Underlining the transformation of Pakistan's political landscape, lawmakers on Saturday gave a unanimous vote of confidence to Gilani, a loyalist of assassinated former premier Benazir Bhutto.

In a gesture to Western nations concerned that Musharraf's decline could result in an easing of Pakistan's efforts to counter al Qaeda and Taliban militants entrenched along the Afghan border, he announced that "fighting terrorism" was his government's "top priority."

"The war against terrorism is our own war," Gilani told lawmakers, who repeatedly thumped their desks in approval as he outlined his priorities.

But he also said authorities were "ready to hold talks with those who will lay down their arms" in order to restore peace.

Gilani promised to develop the impoverished frontier region's economy and abolish criminal codes dating back to British colonial rule that contribute to its isolation.

However, he gave no indication whether his government was prepared to negotiate with hardcore militants blamed for a wave of suicide attacks in Afghanistan and, increasingly, in Pakistan.

Deputy U.S. Secretary of State John Negroponte cautioned on Thursday during a visit to Pakistan that some militant groups were "irreconcilable" and had to be fought.

Bhutto's Pakistan People's Party and that of former Prime Minister Nawaz Sharif finished first and second in Feb. 18 parliamentary elections, trouncing Musharraf's political allies.

The country faces gathering economic problems, including double-digit inflation, electricity shortages and deteriorating state finances. Gilani announced a government austerity campaign, including restricting the size of cars driven by ministers.

But Sharif and Asif Ali Zardari, Bhutto's widower and political successor, also want the new government to deliver quickly on a politically explosive pledge to restore Supreme Court judges ousted by Musharraf.

Gilani said his government would "work for" that goal, but didn't explain how it would be achieved.

Musharraf declared emergency rule and purged the court last November to forestall legal challenges to his re-election as president the previous month.

Musharraf retired as army chief only in November.

Sharif, who was ousted as prime minister and exiled after the 1999 coup, is pushing hard for Musharraf's resignation. Party lieutenants say parliament could impeach him if he doesn't resign.

"Musharraf is part of the problem in Pakistan, and he can't be part of the solution," Chaudhry Nisar, a leader of Sharif's party, told reporters outside parliament on Saturday.

"Only after his removal from office, can Pakistan move forward on the road to prosperity and democracy ... Under no condition are we prepared to work under Pervez Musharraf," he said.

Musharraf, a stalwart ally of the U.S. in its war on terrorism, appears increasingly isolated.

Negroponte promised after talks with Pakistan's old and new leaders that Washington would not interfere in the country's politics to save Musharraf.

Still, he was cautious on the new government's hopes to talk peace with some of the pro-Taliban militant groups battling Pakistani and U.S.-allied forces in the Pakistan-Afghan border region.

Osama bin Laden and other al Qaeda suspects are believed to be hiding in the frontier region, which has seen a spike in U.S. airstrikes in recent months.