ISLAMABAD, Pakistan – President Bush said yesterday that he was satisfied with Pakistani President Pervez Musharraf's efforts to hunt down al-Qaeda terrorists operating inside his country and encouraged him to continue implementing democratic reforms.

“Part of my mission today was to determine whether or not the president is as committed as he has been in the past to bringing these terrorists to justice, and he is,” Bush said at a joint press conference at the presidential place after more than an hour of private talks with Musharraf, an army general who seized power in a bloodless 1999 coup. “He understands the stakes, he understands the responsibility, and he understands the need to make sure our strategy is able to defeat the enemy.”

“We will win this fight together,” Bush said. “While we do have a lot of work to be done, it's important that we stay on the hunt.”

With the city streets cleared and security extremely tight for Bush's first visit to Pakistan, Bush offered praise for Musharraf as well as a gentle push to spread democracy more forcefully. “I believe democracy is Pakistan's future,” Bush said.

Musharraf insisted he was committed to democracy, noting that he has liberalized Pakistan's press and allowed parliamentary elections. “This is an issue that has to be addressed . . . according to the constitution of Pakistan, and I will never violate the constitution,” he said. “Democracy will prevail.”

But less than 12 hours earlier, Pakistani police detained Iman Khan, a former international cricket star and member of parliament, and placed him under house arrest to prevent him from leading a protest march against Bush and Musharraf near Islamabad.

In a telephone interview from his home near the capital, Khan accused the Pakistani leader of having him detained because Musharraf is “scared of the public.” He said the protest was aimed at highlighting “Bush's double standard.”

Bush, Khan said, claims “that his foreign policy goal is to promote freedom and democracy in the Muslim world and here he's come to support a military dictator. A serving general running the country and calling it democracy – it's just making fools out of us.”

Bush flew into Pakistan from India on Friday night and was returning to the United States last night.

The president made clear yesterday that Pakistan should not soon expect a civilian nuclear agreement like the one he made with India on Thursday.

Bush said he and Musharraf had discussed a civilian nuclear program for Pakistan. “I explained that Pakistan and India are different countries with different needs and different histories,” Bush said at a joint outdoor news conference with Musharraf on the grounds of the presidential palace, Aiwan-e-Sadr. “So as we proceed forward, our strategy will take in effect those well-known differences.”

Before Bush's remarks, administration officials said Musharraf had no chance of making such a deal when proliferation and terrorism remained concerns in Pakistan. A.Q. Khan, the founder of Pakistan's nuclear program, has confessed to having run an illegal nuclear proliferation network.

Critics of Bush's nuclear agreement with India say it will only encourage other nations to demand similar arrangements. Under the terms of the Indian pact, the United States will end a moratorium of decades on sales of nuclear fuel and reactor components and India will separate its civilian and military nuclear programs, and open the civilian facilities to international inspections.

Bush and Musharraf mostly glossed over their differences to highlight U.S.-Pakistani cooperation in capturing and killing al-Qaeda terrorists and members of the Taliban living in the country's dangerous northwest border. With Osama bin Laden and many of his top lieutenants on the loose and believed to be hiding in Pakistan's mountainous tribal regions, Bush said the two leaders talked at length about anti-terrorism agendas.

Yesterday, Pakistan sent in helicopter gunships against militants who have virtually taken control of the town of Miran Shah, in the tribal areas bordering Afghanistan, following a government raid Wednesday on a suspected terrorist training camp in the area. Nearly 50 militants were killed, Pakistani officials said, wire services reported.

The militants used rockets yesterday to attack government buildings in Miran Shah, where they had already seized control of the telephone exchange and other government buildings.

Residents fled the town after gun and missile fire that a government official said had caused “very, very high” casualties.

Bush's visit came at a tense time in Pakistan, where recent violent protests against the publication of Danish newspaper cartoons of the Prophet Muhammad have also served as a vehicle for public anger toward the United States and Musharraf.

Somewhat contrary to expectations, however, the streets did not erupt in major demonstrations yesterday, in part because of a government crackdown.

In the city of Rawalpindi about 10 miles from Islamabad, police arrested about 20 members of Tehrik-e-Insaf, Khan's small political party, as they staged a noisy but peaceful demonstration against Bush's visit, beating some of them with bamboo sticks as foreign journalists and camera crews recorded the scene.

Before they were hustled away, protesters chanted slogans against the U.S. and Pakistani leaders, including, “The friend of Bush is a traitor to the country,” “Bush is a dog,” and “Musharraf is a friend of Jews.” One protester carried a placard that read, “Bush, you killed 100,000 Muslims in Iraq in the name of democracy.”

Bush is “a man of double standards,” one of the party leaders, Amir Kiani, said by cellular phone from the back of a police van moments after his arrest. “Do you feel it is a democracy here? This was a peaceful demonstration.”

At a news conference yesterday afternoon, Pakistan's foreign minister, Khurshid Kasuri, said the detention of Khan and other protest organizers was necessary to prevent the kind of disturbances that led to several deaths in Pakistan during the recent cartoon protests. “The idea is to prevent a breakdown of law and order,” he said, asserting that such detentions normally last for less than a day.

Kasuri acknowledged that U.S. officials had raised concerns with Musharraf about the infiltration of militants from Pakistan into Afghanistan and Indian-held Kashmir. But he insisted that the government was doing everything that it could to stop the infiltration, comparing the situation to the difficulties faced by U.S. forces battling insurgents in Iraq.

“You have 130,000 troops in Iraq,” he said forcefully in response to an American reporter's question. “There are bombs every day – 50 or 60 people are killed. You have not arrested (terror mastermind Abu Musab) Zarqawi as yet. Am I to suspect that the United States is not serious about Iraq? Is that a logical conclusion? No.”

The Associated Press and New York Times News Service contributed to this report.