PESHAWAR, Pakistan - Militants attacked a hotel popular with foreigners in the northwestern Pakistani city of Peshawar with guns and a truck bomb on Tuesday, killing five people and wounding 25, government and security officials said.

Taliban militants stepped up bomb attacks after the military launched an offensive in the former tourist valley of Swat and neighboring districts northwest of the capital in April.

A Reuters reporter saw two wounded foreigners coming out of the Pearl Continental Hotel in Peshawar which security officials said militants attacked with guns and a suspected suicide truck-bomb.

I was in the Chinese restaurant when we heard firing and then a blast. It was totally dark and people started shouting and running, Ali Khan, a hotel waiter, told Reuters.

Intelligence officials said some attackers scaled the wall of the hotel into its compound and opened fire before a big truck-bomb blast in the front car park.

Dozens of cars were destroyed. A hospital official said a wounded foreign woman worked for the U.N. children's fund.

The United Nations is heavily involved in providing relief for more than 2.5 million people displaced by the fighting in Swat and elsewhere in the northwest.

A suicide truck bombing killed 55 people in September last year at Islamabad's Marriott Hotel.

The United States, which needs sustained Pakistani action to help defeat al Qaeda and cut off militant support for the Afghan Taliban, has been heartened by the resolve the government and military are showing in the Swat offensive.

Alarmed by the possibility of nuclear-armed Pakistan drifting into chaos, the United States had criticized a February pact with the Taliban in Swat.

It was not immediately clear how many attackers were involved in the Peshawar hotel attack and what their fate was.

TURNING ON THE TALIBAN

Earlier on Tuesday, the army came to the help of a pro-government militia fighting the Taliban in a northwestern district after outrage over a suspected Taliban bomb attack at a mosque last week that killed about 40 people.

The villagers' action is the latest in a series of examples of people turning on the Taliban in recent weeks, underscoring the shift in public opinion away from the Islamists.

Senior police officer Rahim Gul told Reuters by telephone two army helicopters had attacked militants surrounded by militia fighters in a village in the Upper Dir district.

Gul said more people were joining the militia and it was making advances after heavy clashes. Paramilitary soldiers set up mortars on high ground above the village. About 25 militants were killed in the fighting, police and the military said.

U.S. Director of National Intelligence Dennis Blair said on Monday Pakistan's army was gaining in its offensive because public support for the operation was solidifying.

For the first time, the Pakistan army operations in that part of the world have support of the government and the public. This is really different from the past, when the army went up and there was little backing, Blair told intelligence officials in Washington.

The military says troops have cleared most of Swat though soldiers are encountering pockets of resistance.

The army said on Tuesday afternoon 14 militants and one soldier had been killed in Swat in the previous 24 hours.

In all, the army says more than 1,300 militants and 105 soldiers have been killed. There has been no independent confirmation of the figures.

U.S. envoy to Afghanistan and Pakistan Richard Holbrooke also said on Monday that Pakistani public opinion was increasingly on the government's side, and he renewed calls for other Western countries to provide more aid for the displaced.

The United States has pledged more than $300 million for the crisis, compared with less than $200 million from the rest of the world, he said. The government risks seeing public support evaporate if the displaced are not looked after.

(Additional reporting by Kamran Haider, Faris Ali, Aizaz Mohmand; Writing by Robert Birsel)