South Africa A 227 for 7 (Kuhn 105, Markram 71, Porter 3-41) trail England Lions 386 (Foakes 127*) by 159 runs
Scorecard
England Lions stunned South Africa A with a late burst of six wickets in 16 overs to capitalise on a superb unbeaten century by Ben Foakes on a fluctuating second day of the first-class match in Canterbury.
Foakes, who was on 77 overnight, ended unbeaten on 127 in a total of 386, his first Lions century and his seventh in first-class cricket.
The tourists responded with an aggressive opening partnership of 164 inside 41 overs between their young captain Aiden Markram and Heino Kuhn, a 33-year-old who has made seven T20 international appearances.
But Jamie Overton dragged the Lions back into the game with a superb spell from the Pavilion End in the evening session.
Then Jamie Porter followed up with a burst of three wickets in three overs - his first for the Lions.
Tom Helm chipped in with the prize scalp of Temba Bavuma, and when Sam Curran trapped Dane Piedt lbw, the tourists had lost six wickets for 31. They will resume on Friday on 227 for 7 - still 159 behind.
Overton's first wicket was a gift from Markram, who top-edged a pull to long leg where Helm took a cool catch. But Overton then stunned Kuhn with a rapid yorker which won an lbw decision, shortly after he had reached a 114-ball century.
The Somerset bowler could easily have had at least one more wicket but it was Porter who claimed the third breakthrough as Theunis de Bruyn, another of the six members of this South African team with senior international experience, pulled a short ball to Haseeb Hameed at midwicket.
The 23-year-old Essex seamer then dismissed Khaya Zondo and Heinrich Klaasen in the space of four balls, both snapped up at second slip by Lions captain Keaton Jennings.
Earlier Foakes had continued to play with positive intent, punching the first two balls of the morning from Beuran Hendricks through the covers for four.
He reached his century from 151 balls with 13 fours and added four more, helped by lower-order support from Helm and Jack Leach in stands of 44 and 53 respectively - although the morning session was interrupted by a violent electrical storm.
Porter fell quickly to leave Foakes 14 short of his career best, and after 284 minutes at the crease he trotted back to the pavilion to change into his wicketkeeping gear - meaning he has now been on the field for every ball of well over four sessions.