Ireland's Dan Martin strengthened his overall lead in the Tour of Catalonia as Simon Gerrans sprinted to victory on the sixth and penultimate stage.
Martin, 26, picked up three bonus seconds in an intermediate sprint to extend his advantage over Spain's Joaquin Rodriguez to 17 seconds.
Australian Gerrans out-sprinted Gianni Meersman to win the stage in Valls after a 178.7km race from Almacelles.
Britain's Sir Bradley Wiggins remains fourth, 54 seconds behind Martin.
The Team Sky rider lost eight more seconds on Martin and is nine seconds behind third-placed Nairo Quintana going into Sunday's final stage which finishes in Barcelona.
Fellow Brit Josh Edmondson, who also rides for Team Sky, was involved in an eight-man breakaway, which was finally reeled in with around 5km remaining.
The narrow streets and tight turns in Valls made for a thrilling final couple of kilometres and Omega Pharma - Quick-Step rider Meersman, who won the first two stages of the race, looked set to win his third as he sprinted clear of Daniele Ratto, who finished third, in the closing stages.
However, Orica GreenEdge's Gerrans powered past Meersman in the final 20m to snatch victory.
Martin, who is an accomplished climber, looks favourite to win a race he has finished second, third and fourth in the last four years.
Sunday's 122km final stage starts in El Vendrell and heads to Barcelona where the riders will complete eight circuits, taking on the short climb up Montjuic on each lap.
Tour of Catalonia stage six results:
1. Simon Gerrans (Aus/Orica) 3:55:46"
2. Gianni Meersman (Bel/Omega Pharma - Quick-Step) same time
3. Daniele Ratto (Ita/Cannondale)
4. Samuel Dumoulin (Fra/AG2R)
5. Danilo Wyss (Swi/BMC Racing)
6. Julien Simon (Fra/Sojasun)
7. Daniel Moreno (Spa/Katusha)
8. Joaquim Rodriguez (Spa/Katusha)
9. Jakob Fuglsang (Den/Astana)
10. Rigoberto Uran (Col/Team Sky)
Tour of Catalonia overall classification:
1. Daniel Martin (Ire/Garmin) 26:16:22"
2. Joaquim Rodriguez (Spa/Katusha) +17"
3. Nairo Quintana (Col/Movistar) +45"
4. Bradley Wiggins (GB/Team Sky) +54"
5. Michele Scarponi (Ita/Lampre) +55"