Gloucestershire look certain to be in the Friends Provident Trophy quarter-finals after half-centuries from James Franklin and Steve Adshead guided the Group C leaders to a three-wicket victory over Yorkshire with four balls to spare at Bristol.

Yorkshire posted 217 for nine in their 50 overs, thanks mainly to Anthony McGrath and Richard Pyrah, who made 67 apiece after the visitors had been reduced to 49 for five by the bowling of Jon Lewis and Franklin.

Gloucestershire suffered a mid-innings slump when young left-arm spinner David Wainwright accounted for Chris Taylor, Alex Gidman and Will Porterfield without conceding a run in his first seven balls.

But Franklin (51 not out) and Adshead (56) kept their cool and secured a fifth successive win for Gloucestershire with a seventh-wicket stand of 106 in 18 overs.

Yorkshire were without former England captain Michael Vaughan due to a hamstring problem, and their innings plunged into trouble against the bowling of Lewis and Franklin.

Lewis bowled Jacques Rudolph in his second over with an inswinging delivery which knocked out middle stump.

Then, having been struck for three successive boundaries by Rana Naved in his next over, Lewis exacted revenge by having him lbw as he played forward.

Franklin enjoyed a double success in the 12th over when Andrew Gale was caught behind and Joe Sayers was leg before as he played back to his first ball.

It became 49 for five when Adil Rashid edged a wide delivery from Lewis to Adshead, and it would have been 67 for six had the Gloucestershire wicketkeeper not spurned a stumping chance when Pyrah was on six.

Pyrah and McGrath responded with a partnership which became increasingly fluent and eventually realised 115 runs in 27 overs.

It was broken when McGrath skied a ball from Anthony Ireland to Porterfield at mid-off, and the same fielder held a catch to dismiss Deon Kruis off Lewis two overs later.

Pyrah's fine innings ended when he was bowled sweeping at Vikram Banerjee, and Simon Guy made a rapid 22 before he was caught at mid-off from Franklin's bowling in the last over.

Gloucestershire's reply got off to a poor start when Kadeer Ali was caught at first slip off Rana and Hamish Marshall played on to Kruis inside seven overs.

Porterfield and Craig Spearman revived the innings with a partnership of 55, which ended when Spearman was bowled off his pads by Kruis.

McGrath brought Wainwright on to bowl for the 27th over and the youngster began with a double-wicket maiden after Taylor gave a return catch and Gidman was caught behind.

He had more to celebrate in his next over when Porterfield fell to a juggling leg-side catch by Simon Guy and, at 107 for six, Yorkshire looked favourites to register a third win in five matches.

However, Franklin and Adshead responded to the crisis in style and Adshead upped the tempo with two leg-side sixes off Wainwright and Steven Patterson.

Only five runs were needed when Adshead sliced a drive off Kruis to Rana at third man, having made his 56 from 57 deliveries.

Lewis was dropped by substitute fielder Adam Lyth at long-on in the penultimate over, and Franklin completed the win with a mid-wicket boundary off Patterson which brought up his half-century.