The top U.S. military commander said Saturday that the threat of Islamic extremism was growing in Pakistan and that the country's leadership was keenly aware of the challenge facing the nation.

Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, made the comment to reporters after meetings with Pakistan's senior leadership including President Pervez Musharraf and the army's chief, Gen. Ashfaq Parvez Kayani.

Mullen said much of the discussion centered on the situation along Pakistan's lawless northwestern border with Afghanistan, where Pakistani forces have been battling Taliban and al-Qaida fighters.

"Certainly the threat is going up," Mullen said. "We're both concerned about that. Certainly in my meetings today, all the leadership expressed concern about being able to eliminate that threat over time."

U.S. officials have complained privately that the Pakistani leadership had underestimated the threat posed by Islamic extremists, who, at least in the past, have had close ties with Pakistani intelligence officials.

Mullen's remarks came on the same day a bomb attack killed at least 18 people and wounded more than 25 others at an election rally in a northwestern town, according to officials. No one immediately claimed responsibility. Islamic extremists operate in the area.

Fighting increased sharply last year between Pakistani government forces and militants, some of whom sought refuge in Pakistan after being driven out of Afghanistan.

Mullen said he came away from his talks even more convinced "that the border regions are very, very tough" and that Pakistani forces "are making very real sacrifices in this war."

Mullen also said he believed that Pakistan's military had secured the country's nuclear arsenal.

"I'm very comfortable that nuclear weapons are secure and that proper procedures are in place," he said. "And I'm not concerned that they are going to fall into the hands of any terrorists."

Mullen arrived in Pakistan on Friday for a three-day visit, his first since becoming chairman of the Joint Chiefs last year.

He travels to the city of Peshawar on Sunday to meet with commanders of the Pakistani 11 Corps, which is fighting in the border area.