CAPE TOWN, South Africa (AP) — South Africa took a 142-run lead in the first test but a swashbuckling individual performance by Hardik Pandya on Saturday and another injury to Dale Steyn left India still with some hope in the series opener after two days.

South Africa progressed to 65-2 in its second innings in the late afternoon at Newlands to leave India behind. South Africa first posted 286 and then bowled the tourists out for 209 in their first innings.

That first innings was a failure for top-ranked India's celebrated batting lineup on its first attempt to transfer rampant recent home form into some success on the quicker, bouncier South African wickets.

Only Pandya, the 24-year-old allrounder playing just his fourth test, enforced his will on a four-pronged South African quick bowling attack, striking 93 off 95 balls and dragging India from 92-7 to past 200.

"If he hadn't scored those runs, I think we would have been in trouble," said India batsman Cheteshwar Pujara. "His performance today was outstanding."

That imposing South African fast bowling attack included Steyn for the first time in more than a year and he, Vernon Philander, Morne Morkel and Kagiso Rabada were relishing the helpful conditions for seamers in Cape Town.

But Pandya made the day his, even if the match is currently leaning to South Africa, when he followed up his innings-saving efforts with the bat by removing both South African openers with his seam bowling before stumps were called.

Pujara said India, with the pitch easing, felt a target of 350 was "chase-able."

Whatever target India faces, it was given a major boost when Steyn was ruled out of bowling for the rest of the test with tissue damage on his left foot — a "freakish" injury, South Africa's team manager said, after he landed awkwardly in a foothole while bowling.

Steyn left the field just before tea and was sent to a hospital for scans, which confirmed a gloomy prognosis for the 34-year-old speedster who has been plagued by injuries over the last three years. He was out for more than a year before this test with a serious right-shoulder problem, and struggled with other shoulder and groin injuries in the two years before that.

His absence for the rest of the game removes a major advantage for South Africa, the closest challenger to India at the top of the test rankings and which banked on a four-man pace attack to neutralize India's batters.

"We have to find a way to win this test," said South Africa's Rabada.

Before Steyn's left foot took center stage, Pandya arrived at the batting crease second ball after lunch with India at 76-5, and saw his team slip to 92-7. He hit 14 fours and a six in his counterattack, and led a stand of 99 for the eighth wicket with tailender Bhuvneshwar Kumar, who contributed a crucial 25 from 86 balls.

In comparison, India's top six batsmen — under scrutiny to perform in unfamiliar conditions and justify India's No. 1 test ranking — contributed just 71 to the Indian total. Although India was all out for 209 for a 77-run first-innings deficit, it would have been a deficit approaching 200 without Pandya. Before Pandya's adventurous innings, India had struggled against South Africa's unrelenting pacemen. Philander and Rabada finished with three wickets each. Steyn took 2-51 and looked promising in his comeback game before his injury curse appeared again. Morkel had 2-57.

Facing a Proteas pace attack with the potential to be the best in the world, Pandya responded with a free-hitting innings. He rode his luck against both pace and Keshav Maharaj's spin, was dropped in the gully off Steyn when he was on 15 and survived a missed stumping chance off Maharaj when on 71.

He was good enough and brave enough to make those second chances count.