SAN FRANCISCO — His teammates played a game against the Yankees Sunday night that ended well past midnight. They staggered home after a loss, caught a few hours of sleep, then flew here in the morning.
Jon Lester was afforded the luxury of flying ahead of the team so he could get a full night of rest before facing the Giants Monday night.
It worked out well for the lefthander. He pitched one of his best games of the season, taking a shutout into the ninth inning as the Red Sox beat the Giants, 7-0, before a crowd of 41,585 at AT&T Park.
With Tampa Bay beating Baltimore, 4-3, the Red Sox maintained a one-game lead in the American League East.
Lester (11-7) scattered six hits, walked two, and struck out three. He threw 115 pitches.
“Jon gave us exactly what we needed,’’ manager John Farrell said. “We needed a strong pitching performance.’’
The rest of the Sox seemed to have plenty of energy as they collected 11 hits off Tim Lincecum (6-13) and two relievers. Shane Victorino and Daniel Nava were each 3 for 4 with an RBI.
The game was a rematch of June 27, 2010 when Lester beat Lincecum, 5-1.
On that day, Lester went the distance and Lincecum gave up four runs over three innings. This time Lester was a little better as he blanked the Giants and gave the sliding Sox a lift.
The Sox had lost four of five and seven of their last 10 games. But Lester got them started on six-game interleague road trip with a solid win against the struggling Giants.
“My motivation is the same every game,’’ Lester said. “Obviously these guys had a long day. [I] was fortunate enough to come in [Sunday]. We had a tough travel schedule. To do what we did tonight was big for us.”
Lester was at 107 pitches through eight innings. The Sox had a long top of the ninth inning, scoring two runs as Dustin Pedroia tripled, Jarrod Saltalamacchia, doubled and Nava singled.
That prompted Farrell to get Brandon Workman up in the bullpen. Lester went out for the ninth and got one out. He was pulled after consecutive singles by Buster Posey and Hunter Pence, ending his complete game shutout bid.
“We both agreed that he wouldn’t go out there and grind through the ninth inning just to get the complete game,’’ Farrell said.
Workman came in and struck out Joaquin Arias and Hector Sanchez to end the game. The Sox improved to 10-3 against National League teams this season with seven games to play.
“I’m competitive, I wanted to finish the game.,’’ Lester said. “Unfortunately I wasn’t able to do that. I got in a little bit of trouble. Biggest thing is we won the game and we move on to tomorrow.”
Lester retired the first nine Giants on 38 pitches. His perfect game ended when Andres Torres led off the fourth inning with a single.
Lester worked around that easily enough. The Giants didn’t get another runner until the fifth inning, when Pence reached on an error by shortstop Stephen Drew.
Pablo Sandoval hit a high chopper to second base and Pedroia started a double play.
The Giants, down 5-0, mounted their first real threat in the sixth, when Brett Pill walked with one out and took second on a single by Torres.
Lester got former teammate Marco Scutaro on a fly ball to right field before Brandon Belt flied to left to end the inning.
Posey led off the seventh with a single and Lester retired the side from there.
“When you score some runs early, you can get comfortable and feel good with your mix as far as pitches,’’ Lester said. “That makes it easier and you don’t have to work as hard. They had some balls that were squared up but were right at guys.”
Lincecum threw a no-hitter against the Padres July 13. He has one win and a 5.40 earned run average in six starts since. The Sox knocked him out of the game in the sixth.
The second inning was an ugly one for Lincecum and the Giants as the Sox scored three runs.
Saltalamacchia led off with a single before Nava walked and Drew singled to load the bases. Will Middlebrooks’s fly ball to right field scored Saltalamacchia and advanced Nava to third base.
That proved important because Lincecum stumbled while preparing to throw a pitch to Lester and was called for a balk. That scored Nava.
Lester bunted Drew to second base. Jacoby Ellsbury then reached on catchers’ interference for the fourth time this season and the 10th time in his career, adding to his Sox record.
Shane Victorino’s singled scored Drew.
Nava singled with two outs in the fifth and scored when Drew doubled to center field.
“Once we got the lead, we shut them down. We had lot of good at-bats,” said Nava, who has reached base safely in 31 straight starts, the longest streak for the Sox since 2011.
Boston made it 5-0 in the sixth. Ellsbury singled and Giants manager Bruce Bochy called in Guillermo Moscoso to replace Lincecum.
“Offensively, we had good at-bats up and down the lineup,’’ said Farrell. “We talked before the game about not making a big deal about the travel.’'
Moscoso hit Victorino before Pedroia grounded into his second double play. But Ellsbury moved to third and scored when Moscoso threw a wild pitch.
Lincecum was charged with five runs on nine hits. He walked four and struck out four.
Moscoso retired the side in order in the seventh and eighth innings.Peter Abraham can be reached at email@example.com. Follow him on Twitter @PeteAbe.