ST. PETERSBURG -- The Giants didn't move Tim Lincecum before the trade deadline, opting instead to keep the pending free agent and attempt to bring him back into the fold in the offseason.

For the first two months of the season, that plan would have seemed like folly. But the Lincecum of the past two months has been much like the old Cy Young Award winning version, albeit with a different game plan. Lincecum again was sharp Saturday at Tropicana Field but the Giants couldn't provide enough support and lost 2-1 to the Rays in 10 innings.

San Francisco Giants starting pitcher Tim Lincecum throws during the first inning of a baseball game against the Tampa Bay Rays Saturday, Aug. 3, 2013, in
San Francisco Giants starting pitcher Tim Lincecum throws during the first inning of a baseball game against the Tampa Bay Rays Saturday, Aug. 3, 2013, in St. Petersburg, Fla. (AP Photo/Mike Carlson) ( Mike Carlson )

Long after Lincecum had finished his seven dominant innings, rookie Wil Myers hit a walk-off single with the bases loaded. The loss dropped the Giants back to 11 games behind the first-place Los Angeles Dodgers, but as they look toward the future, it's getting easier to see silver linings that didn't exist during June and July swoons. It's easier to see Lincecum sticking around, too.

"He's in a good place," manager Bruce Bochy said. "He's strong and has a lot of confidence going."

Lincecum said that boost has come from increased preparation between starts, primarily with catcher Buster Posey. Even with an eight-run outing in his first appearance after a 148-pitch no-hitter, Lincecum has a 3.78 ERA over his past 11 starts. Teammates have noticed a better rhythm on the mound, and Lincecum said that comes from strictly following the game plan that he creates with Posey.

"That's eliminating my stress," he said. "Once you get in a rhythm, you can establish it. It's just second nature. Then it doesn't matter what he's going to put down."

Lincecum has quality starts in four of his past five appearances and has given up just three earned runs over his past two starts while striking out 15.

"I think we're working well right now," Posey said. "He's definitely putting in his time before games and coming up with a game plan. It probably helps his confidence going into a game, knowing that he's well prepared."

The dominant stretch started June 4, when Lincecum entered a game against the Toronto Blue Jays with a 5.12 ERA. He picked up his fourth win that day but has just one since, becoming the primary victim of the Giants' offensive slump.

Saturday marked the 10th time the Giants have been shut out or scored just one run with Lincecum on the mound.

"It's great to see him pitching like this," shortstop Brandon Crawford said. "We need him, we need all our pitchers right now. We just need to put more runs up for them."

Crawford drove in the lone run against David Price and the Rays on Saturday, bouncing a single into center field in the third inning to bring Jeff Francoeur racing home. Francoeur had three hits on the day, joining Crawford and Joaquin Arias to provide some production out of the bottom of the lineup.

But the Giants' 1-6 hitters had just one hit in 24 at-bats.

The lack of production allowed the Rays to hang around on a night when they scored their first run with a strange rally. Light-hitting catcher Jose Molina reached on a leadoff walk in the third and went to second on a wild pitch. Kelly Johnson followed with a slow roller to the right side that turned into an infield single when Lincecum ran over to cover and inadvertently got in Brett Pill's way as the first baseman tried to tag Johnson. The Rays scored two batters later on a groundout.

"That cheap run hurt," Bochy said. "There's no question."

As Lincecum and Price (one run over nine innings) dueled, Bochy and Rays manager Joe Maddon staged their own battle. Bochy used four relievers to get through the eighth and ninth and Maddon countered by using all five of his bench players in the ninth, including two right-handed hitters who failed to get the winning run home against Giants left-hander Javier Lopez.

The Giants had left a runner in scoring position in the fifth and eighth innings, and they failed to bring Hunter Pence across after a leadoff double in the 10th. Jean Machi entered in the bottom of the inning and immediately walked Desmond Jennings. After a stolen base and intentional walk, Machi couldn't find the zone against Evan Longoria, who is hitless in his past 17 at-bats.

The walk of Longoria loaded the bases and Myers set off a raucous celebration with a single to left.

The Giants will send Guillermo Moscoso to the mound Sunday in hopes of clinching their first four-win trip since early June.

"We have a chance tomorrow," Francoeur said. "We get it, and we'll feel good about ourselves getting on the plane."

For more on the Giants, see Alex Pavlovic's Giants Extra blog at blogs.mercurynews.com/Giants. Follow him on Twitter at twitter.com/AlexPavlovic.

SUNDAY'S GAME

Giants (Guillermo Moscoso 0-0)
at Tampa Bay (Roberto Hernandez 6-11), 10:40 a.m. CSNBA