San Francisco took control of the game with a three-run sixth inning.