Now the pair face a nervous wait before attempting to finish the job.
An enthralling fourth day set up a dramatic finale at Galle International Stadium, where the hosts need two wickets while the tourists require 68 runs.
One outcome seems more likely on a deteriorating pitch, given Sri Lanka’s formidable spin trio have claimed 16 of 18 opposition wickets to fall, but edging this close to victory was once improbable for New Zealand.
Hopes were faint when the home side began the day on 237-4, leading by 202 at a ground where they are seldom beaten.
Two things needed to happen for the Black Caps to have any chance of earning a rare away win: a swift cessation of the Sri Lankan innings and a battling knock with the bat from one of their own.
Patel ticked the first box with five wickets in the first session, bowling beautifully in turning conditions to take five wickets inside nine overs and finish with 6-90. That marked the third-best figures of his test career, the second-best by a New Zealander in Sri Lanka, and left the Black Caps chasing 275 to win.
Their second task was soon hindered by the same circumstances that made Patel’s success possible.
With the footmarks worsening and puffs of dust occasionally emerging from the track, batting had become substantially trickier than earlier in the test. Seven wickets fell on each of days one and two; twice than number were taken on day four.
Batting was too tricky for Kane Williamson, deceived on 30 and stumped for the only fourth time in 178 test innings. And it was too tricky for Daryl Mitchell, averaging 50 but managing only eight before being bowled by an unplayable delivery.
The bowlers who claimed those two wickets – Prabath Jayasuriya and Ramesh Mendis – each added two more scalps to advance their totals at Galle to 60 and 62 respectively. Their strikerates at the ground dropped to 47.2 and 48.8 – better than anyone who has picked up 20 wickets.
And yet, with the duo sending down 54 of 68 overs, Ravindra was unbowed, finding the middle with unerring consistency while allowing few openings and dispatching the bad ball.
The 24-year-old ended the day unbeaten on 91, his finest test innings in sight. Yes, he began the year by cracking 240, his first and only century, but that came in a one-sided home win over a severely understrength South Africa.
This innings – one more testing of mentality than ability – has already confirmed Ravindra has the application to match the explosiveness he displayed at last year’s ODI World Cup.
But the job is not done. He will need assistance, and on the evidence of 15 balls in fading light, he may receive some from Patel.
The No 10 has always illustrated a solid defence at least, accruing a high score of 35 in tests along with three first-class fifties.
Given that Will O’Rourke can’t claim the same, having collected 68 runs in 19 domestic innings, Patel will likely need to hold up an end for much of the rest of this match.
If he can, and if Ravindra is able to add another signature moment to an already considerable highlight reel, the Black Caps will win only their second test away from home in this World Test Championship cycle.
If Ravindra and Patel’s heroics were confined to day four, the Black Caps’ bid to end that cycle in the final will be in serious jeopardy.