Pakistani premier says war averted in Middle East, things still tense