Sir Bradley Wiggins retained the overall lead in the Tour of California but Rohan Dennis closed on him with victory in stage three.
Wiggins replaced fellow Briton Mark Cavendish as race leader after winning Monday's Folsom time trial, with Garmin Sharp's Dennis in second.
The Australian edged out Portugal's Tiago Machado, riding for Netapp-Endura, to win Tuesday's stage from San Jose to Mount Diablo State Park.
His time of four hours, 56 minutes and two second was 20 seconds quicker than ninth-placed Wiggins, cutting the overall deficit to the Team Sky rider to 24 seconds.
Machado was a further 41 seconds behind in third overall, with American Lawson Craddock fourth for Giant-Shimano and another British rider, Orica GreenEDGE's Adam Yates, fifth.