At close of play on the second day, Pakistan were 299 for 2 in reply to Sri Lanka's first innings of 231, with Ijaz unbeaten on 118 and Inzamam on 77.
Both Pakistani batsmen hit some brilliant shots but also benefited from strokes of good fortune. Ijaz in particular rode his luck, surviving several close calls as he unleashed a series of powerful strokes on his way to his 11th century in his 54th Test.
The Sri Lankan attack, shuffled around by their captain Aravinda De Silva - who even bowled himself - toiled manfully but were unable to trouble the Pakistanis.
Their cause was not helped when their wicketkeeper, Romesh Kaluwitharana, felt unwell after lunch and had to be replaced behind the stumps by Hashan Tillekeratne.
Then when the second new ball was taken it only speeded up the scoring, with one over from Chaminda Vaas costing 17 runs, including three consecutive boundaries which took Ijaz past his hundred.
Pakistan lost only two wickets during the day after resuming on 33 for 0. Wajahatullah Wasti was caught by Mahela Jayawardena in the slips off Sajeewa de Silva for 22 and Saeed Anwar made 57 before giving a tame return catch to Russel Arnold.
l South Africa were held up by rain in the Second Test against New Zealand in Christchurch yesterday. Only 40 balls were bowled on the third day with Herschelle Gibbs (113) and Jacques Kallis (58) adding 18 runs to to leave the South Africans on 247 for 1, a lead of 79 over New Zealand's first innings of 168. But the tourists' hopes of forcing a 1-0 lead in the three Test series were also hit when their leading fast bowler Allan Donald, who aggravated a stomach strain after taking three wickets in the New Zealand innings, was ruled out for two weeks with a muscle tear.