Former England wicket-keeper Matt Prior reckons Ben Foakes’s hundred on his Test debut in the series opener against Sri Lanka has left the selectors with a “nightmare decision”.

Foakes was only given his England chance after first-choice Test wicket-keeper Jonny Bairstow sustained an ankle injury playing football in a warm-up during the preceding one-day series but he responded with a fine 107 in England’s first innings in Galle.

The 25-year-old became just the 20th Englishman in 141 years of Test cricket to score a hundred on debut and only the second keeper after Prior, who made an unbeaten 126 against the West Indies at Lord’s in 2007.

England were in trouble when Foakes walked out to bat but his century, which he completed on Wednesday, proved the cornerstone of an eventual first-innings total of 342.

“Getting a debut hundred is phenomenal but in this innings in particular, to walk out at 103 for five and play in foreign conditions, with all the challenges that come with that, is just a huge, huge effort,” said Prior, a member of the talkSPORT radio commentary team covering the series in Sri Lanka.

Foakes’s century, allied to some subsequent sound work behind the stumps, has left England with a dilemma should Bairstow be fit for the second Test in Pallekelle.

Do the selectors drop Foakes after such an impressive and conifident debut or do they retain the Surrey wicketkeeper and play Bairstow purely as a batsman?

“It’s going to be a selectors’ nightmare,” said Prior.

“Jonny, fully fit, would have played this Test match, probably would have performed well, done well with the gloves and scored runs and we wouldn’t be having this conversation,” insisted Prior.

“If he is fully fit, then he should come back into the team. Whether he keeps wicket, that’s a whole other conversation.

“I believe you’ve got to pick the team that’s going to win you a Test match on any given day. If it’s deemed that actually Ben Foakes isn’t in the XI that’s going to win a Test match then you have to make that tough call.”

England ended Wednesday’s second day on 38 without loss in their second innings, a lead of 177 runs after they dismissed Sri Lanka for 203 in the hosts’ first innings.