Surrey 291 for 8 (Burns 95, Fuller 3-26) beat Gloucestershire 279 (Howell 60, T Curran 4-65) by 12 runs
Rory Burns hit a career-best List A score of 95 to guide Surrey to a 12-run victory over Gloucestershire at Bristol and ensure top place in the Royal London Cup Group A.
Both teams could look forward to home quarter-finals from the moment Yorkshire's game with Northants was declared a no-result because of rain in mid-afternoon.
Gloucestershire head coach Richard Dawson admitted: "We got lucky with the rain-off in Yorkshire, which got us out of jail and means we shave a home quarter-final, despite losing. In the end we have made a close game of it in spite of not being at our best.
"A big crowd at Bristol means a great atmosphere for the lads to play in and I think they have played in enough big games now to handle the pressure of a quarter-final."
But it is Surrey who will enter the last eight on the back of a win after running up 291 for 8, with Burns making his runs off 96 balls, with 5 fours and 2 sixes, while teenager Sam Curran hit 42 and Gary Wilson 37.
James Fuller was the pick of the Gloucestershire attack with three for 26 from eight overs. The home side, who had won the toss, made 279 in reply, Benny Howell top-scoring with 60. Jade Dernbach returned 3 for 45 and Tom Curran 4 for 65.
Coming in after Jason Roy and Vikram Solanki had fallen cheaply to Fuller, Burns soon assessed the pace of the pitch and played with increasing confidence.
The inexperienced Aneesh Kapil, who had replaced Steven Davies in Surrey's team because of a family illness, helped take to score to 70 before being caught at mid-wicket for a well-made 33.
Ben Foakes (30) then put together a stand if 72 in 12.5 overs with Burns before being brilliantly caught and bowled by James Fuller, one handed to his left, with the total on 142 in the 27th over.
Burns reached a 59-ball half-century, featuring 3 fours and a six, with Sam Curran offering intelligent support in a partnership of 93 in 15 overs. It was 222 for four with ten overs remaining and Surrey looked set for 300.
But Curran fell lbw attempting to reverse sweep a full toss from off-spinner Jack Taylor and Burns departed five short of a deserved century caught on the boundary attempting a straight six off Benny Howell.
Wilson supplied some late acceleration with two sixes in an over off Taylor and Surrey's total looked very competitive on a slow wicket.
Gloucestershire reached 41 in reply before Will Tavare was caught behind driving at a wide ball from Tom Curran, who also had Gareth Roderick taken by keeper Wilson, having scored 19.
Geraint Jones fell lbw aiming to reverse sweep Gareth Batty and when Chris Dent, having made a bright 49 off 51 balls, cut James Burke straight to Burns at backward point it was 97 for four in the 18th over.
Kieran Noema-Barnett drove Batty to mid-off and when Jack Taylor was caught behind off Dernbach it was 137 for 6. Howell and Fuller made a game of it with a stand of 90 in 15.4 overs, but when the latter fell 65 were still needed and Howell soon followed, having struck 6 fours in his 77-ball innings. Tom Smith's 37 not out at the end was too little too late.