Khawaja’s 15th test hundred helped to turn things around.
He anchored the innings with style and occasional aggression, hitting 14 fours and two sixes.
Three wickets down in the morning, Australia dug in after lunch. Khawaja and Travis Head paired up for 81 runs.
Head plundered Moeen Ali in particular, though the England spinner had the last say by ending the dangerous partnership.
Khawaja and Head, the third-ranked test batter, sprayed the ball above, between and over England’s fielders to give the hosts a taste of their own ‘Bazball’ medicine.
The pair came together at 67-3 and took Australia to 148, increasing the run rate by around a run an over mostly at Ali’s expense, until Head, on 50, advanced once too often against the spinner to send the ball to Zak Crawley at midwicket.
Playing on his home ground, Ali finished the day with figures of 2-124 from 29 overs — including being hit for six five times, twice by Khawaja.
But he went into the match knowing England captain Ben Stokes was happy to back a bowler always on the attack even if he’s expensive.
After dismissing Head, Ali deserved allrounder Cameron Green’s wicket two balls later but Jonny Bairstow spilled a clear stumping chance in what has otherwise been a superb test for the wicketkeeper-batter.
Ali did eventually get Green for 38 with a delivery that spun back sharply.
Australia went to lunch on 78-3 after David Warner self-destructed and England seamer Stuart Broad dismissed Labuschagne off the next ball in more bowler-friendly conditions.
Stokes belied any lingering injury concerns and took 1-33 in seven overs.
He trapped Smith leg before on lunch just when Australia seemed to be recovering.
But Khawaja saved the day.
As it happened - Ashes first test, day two: