The Surrey man was chosen as a specialist keeper after coach Trevor Bayliss pushed the idea that a specialist gloveman would be needed on Galle's turning pitch, with potentially hundreds of overs of spin to be bowled.
But after arriving at the crease with England reeling at 103/5, Foakes helped the tourists stabilise their innings with some sensible play, avoiding the sweep-happy approach of his teammates.
From there he built impressive partnerships with Jos Buttler, Sam Curran and then Adil Rashid to push England beyond 300 and into the realms of respectability, eventually falling for 107 and England were bowled out for 342 within half an hour of day two getting underway.
Foakes' debut ton was all the more sweet as he wasn't even selected in the initial touring squad.
The 25-year-old stumper was just back from what he described as "a lads' weekend" in Lisbon when national selector Ed Smith rang to inform him that he was being called up as cover for the injured Jonny Bairstow.
Bairstow hurt his ankle playing football after a training session, but Buttler was favourite to replace him behind the stumps with England also boasting options in Rory Burns and Oliver Pope.
Foakes impressed the coaching staff, however, and Bayliss pushed for his inclusion in the XI for the first Test - a decision that went very well for the outgoing Australian.
And his composed innings is not just a personal triumph, but an institutional one for the England and Wales Cricket Board. The Colchester-born debutant has travelled to Sri Lanka three times with the Lions and once on a placement with Colombo-based Colts CC, learning more about the alien conditions each time.
At Colts he even played alongside Dilruwan Perera and Akila Dananjaya, two of the bowlers who failed to prise him out here.
“Obviously coming out here a few times, you get good experience,” he said.
“At Colts I got to learn a little bit about Perera and Dananjaya, which was fantastic, it definitely helped. The thing you can't really prepare for here is the heat, unless you've done it.”
Five things you didn't know about England debutant Ben Foakes
by Press Association Sport
Childhood role model
Born and raised in Essex, England's newest wicketkeeper ranked James Foster as one of his childhood role models, and he used to go to Chelmsford to watch T20s. Foakes recalls watching Foster's keeping at a young age and his desire to try and emulate and replicate the actions of the Essex keeper.
Foakes was thrown in the deep end with his professional debut, which came at the age of 17 for Essex against touring side Sri Lanka in 2011. He played as a wicketkeeper and took two catches, one off English fast bowler Tymal Mills, and the other from the bowling of Reece Topley. When it came to batting, Foakes had a more unorthodox start, he got off the mark with an all-run four before being dismissed for five runs by Thisara Perera.
Essex to Surrey move
Frustrated by a lack of first-team chances, especially as keeper, Foakes made the decision to leave his boyhood county, where he had come through the academy, at the age of 21. His appearances were limited by the continued form of his childhood hero, Foster, and he moved to nearby Surrey. Since his move, he has been hailed as the best in the world behind the stumps by Surrey director of cricket, and former England wicketkeeper, Alec Stewart.
Foakes credits his father with much of his early cricket and sporting development and said it was his dad who took him to the nets before he was old enough to play in the teams. Interestingly, his father, Peter Foakes, had a sporting career of his own as a Premier League referee for a number of years until the 1994-95 season. Ben has a tattoo on his wrist to mark the day his father passed away when he was just 13 years old.
Red ball focus
Unlike many modern players, Foakes has prioritises red-ball cricket and has said he feels his game is more suited to the longer format. Speaking in an ECB video, Foakes said he believes he would be better at trying to bat for a day rather than trying to hit it out of the park, and described his approach as “old school.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies