Leeds: Despite an unexpectedly dramatic final day, the second test between England and South Africa at Headingley ended in a draw on Monday.
South Africa declared on 258-9 late on the final day, setting England a target of 253 to win from 39 overs, but the hosts were 130-4 when the teams shook hands on the draw.
"We were probably one wicket away from having a real go there," South Africa captain Graeme Smith said. "We decided at tea we were going to give ourselves five overs and no matter what we were going to get out there and bowl."
England opened with Kevin Pietersen, but he fell to Vernon Philander for 12 and despite 46 from Alastair Cook the batsmen were unable to keep up with the run rate and in the end had to block.
"We put Kevin (Pietersen) up there because he played so magnificently in the first innings, he was capable of taking the game away from South Africa on his own," England captain Andrew Strauss said. "Once he got out we decided to take stock a little. With 20 overs to go we almost decided to treat it as a Twenty20 game. It was certainly a viable chase, but we needed things to go right for us."
JP Duminy had South Africa's best figures with 1-10.
Earlier, the tourists collapsed from 120-0, after Jacques Rudolph and Smith had hit 69 and 52, respectively.
The game had looked to be meandering toward a draw until part-time spinner Pietersen took 3-52 to remove South Africa's top three.
Stuart Broad took 5-69, including a spell of four wickets from 20 balls.
James Anderson caught and bowled Dale Steyn and when Morne Morkel soon after holed out to Broad, South Africa decided to declare.
South Africa began the final day under overcast skies and in an atmosphere that resembled that of a county match, with a few hundred spectators dotted around largely empty stands.
Smith should have departed on the fourth ball of Bresnan's first over of the day, but a diving Anderson failed to hold a difficult chance.
Rudolph fell lbw to Pietersen's second ball of the morning, a decision he unsuccessfully referred — the spinner had also removed Rudolph with his second ball in South Africa's first innings.
The hosts were convinced Smith was out caught behind to Pietersen in the second over after lunch, but a referral upheld umpire Steve Davis' decision that he hadn't touched the ball.
In Pietersen's next over, however, Smith did go, in contentious circumstances. He was hit on the pad and Davis ruled the ball had brushed his bat before it was caught by James Taylor at short leg.
Smith referred the call and although replays looked inconclusive third umpire Asad Rauf sided with Davis.
Anderson then dropped his second catch of the day when he put down AB de Villiers off Pietersen, but Hashim Amla fell for 28 in the 51st over when he drove a rank full toss from Pietersen straight to Cook at cover.
South Africa scored so quickly that the game was going away from England until Broad took two wickets in as many balls in the 56th over.
De Villiers was lbw for 44 to a ball that was drifting down the leg side — and with South Africa having used both its referrals de Villiers had to walk.
Duminy was lbw for a golden duck to Broad's next ball and Philander fell, also leg before, to Broad in the 60th.
Jacques Kallis, batting despite back spasms, was then caught behind off Broad for 27, forcing Alviro Petersen, who has a hamstring problem and was only due to bat in an emergency, to the crease.
Anderson partly atoned for his earlier drops when he brilliantly caught and bowled Steyn for 3 early in the evening session and South Africa surprisingly declared when Morkel fell for 10.
England reshuffled the batting order, promoting Pietersen, who made 149 in his first innings, to open alongside Cook, but after a quickfire 12 he was caught by Imran Tahir off Philander, with England on 21-1.
Strauss was caught and bowled off a full toss from Duminy for 22 before Cook survived a referral when he was hit outside the line by a ball from Tahir that would have hit middle stump.
Cook smashed Duminy for six over midwicket but was caught by Rudolph off Steyn.
With three wickets down England sent in Matt Prior as a final throw of the dice, but he was run out for 7 after Jonathan Trott refused a single.
Needing six wickets South Africa opted to continue into the final hour, but Trott (30 not out) and Ian Bell (3 not out) blocked until a truce was agreed with six overs remaining.
South Africa, which leads the three-test series 1-0, will replace England at the top of the ICC world test rankings by winning the series.
The third and final test begins at Lord's on Aug. 16.