The attack came as residents elsewhere in Pakistan 's northwest tried to push out a group of Taliban militants who ventured into their territory from their stronghold in the Swat Valley and killed five people .