Pakistani security officials say they have detained a suspected Taliban commander and killed at least five other militants during an operation in the country 's northwest .