ISLAMABAD, Pakistan  A wave of attacks against top security installations over the last several days demonstrated that the Taliban, Al Qaeda and militant groups once nurtured by the government are tightening an alliance aimed at bringing down the Pakistani state, government officials and analysts said.

More than 30 people were killed Thursday in Lahore, the second largest city in Pakistan, as three teams of militants assaulted two police training centers and a federal investigations building. The dead included 19 police officers and at least 11 militants, police officials said.

Nine others were killed in two attacks at a police station in Kohat, in the northwest, and a residential complex in Peshawar, capital of North-West Frontier Province.

The assaults in Lahore, coming after a 20-hour siege at the army headquarters in Rawalpindi last weekend, showed the deepening reach of the militant network, as well as its rising sophistication and inside knowledge of the security forces, officials and analysts said.