Half-centuries from Ian Bell, Tim Ambrose and Keith Barker led Warwickshire to safety as Surrey had to settle for a draw after dominating much of their Specsavers County Championship match at Edgbaston.
Warwickshire began the last day on 162 for four, leading by only 57 and with plenty of batting to do to stave off the prospect of a third successive defeat.
But, abetted by a flattening pitch and the loss of ten overs to rain, they advanced to 435 for eight, thanks principally to Bell (99 from 162 balls, ten fours), Ambrose (85, 128 balls, 13 fours) and Barker (70 not out, 80 balls, 13 fours).
Surrey's seamers, led by Tom Curran who finished with four for 112 and eight wickets in the match, persevered but were blunted by a pitch which declined to deteriorate and a Warwickshire batting unit which, unlike in the first two games this season, declined to fold.
Surrey coach Michael Di Venuto said: "Warwickshire played really well today, there's no doubt about that. We tried our hardest and threw everything at them and it wasn't enough. Over the whole game there was some outstanding stuff from us and some very average stuff. We were slow to start the game and took two sessions to get it together and then took seven for 69 to finish it off which was a brilliant comeback.
"Then with the bat we got ourselves into a great position but it was disappointing the way we finished off there. It was a really mixed performance. The good stuff was excellent but there was some average stuff with both bat and ball."
Unbeaten overnight, Bell and Ambrose had almost negotiated the first hour's play when Bell, a single short of his 52nd first-class century, pushed forward to Gareth Batty and edged to wicketkeeper Ben Foakes.
Ambrose and Rikki Clarke then added an unbroken 58 before bad light brought an early lunch. After the interval they extended their alliance to 80 before falling in successive overs from Tom Curran. Clarke (27, 66 balls, five fours) edged to Scott Borthwick at second slip and Ambrose sliced to Kumar Sangakkara at first.
That left Warwickshire 198 ahead with three wickets left and 48 overs remaining so Surrey still had a sniff of victory but Barker continued his consistent form with the bat this season. He added 41 in 13 overs with Jeetan Patel and, after Patel fell lbw to Tom Curran, found another resolute partner in pace-bowling partner Chris Wright (36 not out, 53 balls, six fours).
Barker completed his third half-century in six Championship innings this season as the ninth-wicket pair added an unbroken 91 before hands were shaken.
Warwickshire first-team coach Jim Troughton said: "It was a much-improved performance. We have come off the back of two quite damaging defeats and times like that are a true test of the individuals and also you collectively as a team. We spoke very honestly on the third evening against Yorkshire when we knew the game was gone and we needed to sit down and address a few things.
"It was a good to see the guys bat well. Sometimes with batting the more you try the harder it can become and sometimes you just need to relax that little bit. The way Ian Bell and Tim Ambrose batted today was a good example of that. They have got quality and worked out a few things and just let the ball come to them and played really well."