The major died in the exchange of fire, the military's media arm said.
Three terrorists were killed in retaliatory firing, it said in a statement.
The attack came even as the banned Tehrik-e-Taliban Pakistan said it was serious about holding peace talks with the government.
State negotiators yesterday suspended a fledgling peace process with the Taliban after a militant faction said it had executed 23 paramilitary troops taken hostage in 2010.
