To get into even that moderately hopeful position, the Black Caps were forced to scrap, after an excellent lower-order display from the hosts.
From 130-6, Sri Lanka battled their way through to 244, with Dhananjaya de Silva producing extremely valuable partnerships of 41 with Dilruwan Perera, 43 with Suranga Lakmal and 20 with last man Lahiru Kumara.
Trent Boult and Tim Southee eventually did the bulk of the damage for the Black Caps — the pair now have a combined 500 test wickets — but Boult will be left ruing his one blunder from his stint with the ball. Boult dropped one of the easiest catches in cricket history with de Silva — already beginning to walk off, so sure was he of his demise — on nine. The Sri Lankan all-rounder then punished the New Zealand bowlers to the tune of another 100 runs before Boult finally made belated amends and ended an excellent knock.
Not so excellent were the Black Caps' early returns. With Sri Lanka using their brigade of spinners early, Jeet Raval prodded at the ninth ball he faced, edging Perera straight to slip. While still an automatic selection to face England if healthy, Raval could use a second-innings score if he takes the crease again. The 30-year-old averages 41.2 in New Zealand — on the statistically-friendliest wickets for batsmen in the world — but just 18.6 in nine innings away from home, in tougher conditions.
Having more success was Latham, who saw off a tricky early period from Perera where he was unconvincing onto the back foot, before playing assertively as his innings progressed. Perera nearly had his man on 79, but Latham was saved from being trapped lbw by the smallest of spikes upon Sri Lanka's review – television replays showing the ball seemingly taking the smallest tickle off his glove.
Perera wouldn't get a better chance, and Latham's shot to bring up his 10th test century was far more emphatic – punching the veteran spinner off the back foot through mid-wicket for four, and receiving a standing ovation from his teammates.
Some of those teammates had assisted him briefly but couldn't kick on – Kane Williamson's trademark guide through the slips accidently went straight to the fielder at second slip, departing for 20, while Ross Taylor (23) and Henry Nicholls (15) both had edges snaffled up first slip, ending promising partnerships with Latham. The Cantabrian found a partner through until stumps in Watling though, adding an unbroken 70 to close in on Sri Lanka's first-innings total.
A first-innings lead — and a decent one at that — looms as being vital if the Black Caps are to triumph, and boost their World Test Championship prospects. The weather may still have the final say, but with the last 25 tests in Sri Lanka all finding a victor, and Latham in fine form, perhaps there's still life in this test yet.