The tourists scored 78-2 from 20 overs before the players went off again just before 7.30pm (NZT).
Azhar and Asad Shafiq put on 115 before Jackson Bird picked up his third wicket, with Steve Smith taking the catch in slips to remove Asad for 50.
When Matt Renshaw at first slip snared Sarfraz Ahmed off Josh Hazlewood for 10, Pakistan were 268-6.
Azhar and Mohammad then batted well to put Pakistan in a strong position, given the constant rain delays.
The late session on the first day was cancelled, plus there was a short break early on the second day before lunch was taken early.
Azhar had three lives in his 12th test century and his first at the MCG.
Nathan Lyon could have run him out on six and 112, but the two sharp throws missed the stumps.
Three balls after the second run out chance, wicketkeeper Matthew Wade was unable to get his gloves under a low chance from Azhar off the bowling of Mitchell Starc.
Pakistan were shaky when they resumed on day two at 142-4, but Azhar and Asad took them through the morning session.
Earlier, Australian captain Steve Smith voiced his displeasure with a busy summer schedule which will force him to miss the upcoming Twenty20 series against Sri Lanka.
The three-match T20 series, beginning in Melbourne on February 17 and finishing in Adelaide on February 22, is set to clash with the test squad's tour of India starting in Pune on February 23.
It's likely the test side will assemble on the subcontinent in early February, wanting a better chance to adjust to local conditions as they seek to gain revenge for a shambolic 4-0 series loss to India in 2013.
Smith has confirmed he will miss the T20 series, and the likes of David Warner and Starc are also likely to be unavailable.
"I don't think it's ideal," Smith said.
"I think the Australian public would love to see the best Australian team on the park for every game. It's difficult to do that with the schedule and how much we play."
Cricket Australia high-performance manager Pat Howard has previously said Australia should embrace the prospect of two teams being in action almost simultaneously.
"There is a way to have a think about this differently, to give us a better chance of winning."
With players now competing regularly in three formats of the game, managing their workloads has become increasingly tricky.
Australia chose to rest Josh Hazlewood and Mitchell Starc for their one-day international tour of South Africa in October and ended up losing the series 5-0.
"Had they been there, things could have been slightly different," Smith said.
"We look now and see how well they're bowling, and (considering) how much cricket they've had to play over the summer, it was probably the right decision to have rested them and made sure they were fit for the summer."
- AAP