Just as Hazlewood was bowling his third delivery, Azhar pulled away from the crease, because a fly was buzzing inside his helmet. The Australian quick was not impressed and the umpires spoke to Azhar, who protested his case.
The ball was re-bowled and Azhar drove it into the covers for three, but Hazlewood was rewarded for some tight bowling, when Smith just managed to snare Babar's edge.
Earlier, Lyon was the shining light in the cloudy, humid conditions, as Pakistan made a watchful start.
Lyon re-affirmed his status as Australian cricket's cult figure, with the crowd chanting "Garry, Garry", when the off-spinner was brought on to bowl in the first hour.
It proved a tactical masterstroke from Smith. Lyon's third delivery was a beauty and Aslam edged it to Smith at first slip for a regulation catch.
Batting was always going to be hard going in the first session and Pakistan scored just 60 from 26 overs.
Pakistan made one change, with Sohail Khan coming into the side at Rahat Ali's expense, while Australia were unchanged.
Smith said, at the toss, he also would have batted.