Updated

Josh Thole and the New York Mets were one long fly from a feel-good win.

Once again, they wasted their chances.

Thole grounded into an inning-ending double play with the bases loaded in the ninth and Aubrey Huff ended an 0-for-20 slide with a leadoff homer in the 10th, sending the San Francisco Giants to a 7-6 victory Tuesday night.

"When you've got one of your better pitchers on the mound and you've scored six, you've got to win those games," Mets manager Terry Collins said.

Nate Schierholtz homered for the Giants, who snapped out of their offensive slumber and touched up New York knuckleballer R.A. Dickey for six runs in six innings. The defending World Series champions, shut out three times in their previous six games, entered with the second-worst offense in the National League.

"It's frustrating, but you don't want to doubt yourself too much," Dickey said.

Javier Lopez (1-0) and Francisco Rodriguez escaped dicey jams in the ninth before Huff sent a 2-0 pitch from Taylor Buchholz (1-1) off the facing of the right-field overhang for his third home run.

Before that, Huff was in a 3-for-37 rut with one RBI during that stretch. He entered the game batting .190.

"Just kind of left it right down the middle for him," Buchholz said. "This isn't the way you want to lose a game."

Brian Wilson got three outs to earn his ninth save in 10 chances.

Carlos Beltran hit a three-run homer and Ike Davis a two-run shot for the Mets off Ryan Vogelsong, a winner last week at Pittsburgh in his first major league start since 2004.

The 33-year-old journeyman was a brief respite for the Mets while facing Roy Halladay, Cliff Lee and Tim Lincecum in a four-game stretch.

New York had the bases loaded in the bottom of the ninth, but Thole grounded into a 1-2-3 double play against Lopez to end the inning.

"The outfield was in a little bit. I tried to hit it hard up the middle and I hit it off the end," said Thole, who had three hits.

The last-place Mets went 2 for 12 with runners in scoring position. They are hitting .228 in those situations this season, including .107 (3 for 28) over the last two games.

San Francisco scored four times in the third to take a 4-3 lead, getting RBI singles from Vogelsong and Aaron Rowand before Mike Fontenot's two-run single capped the rally.

Schierholtz's homer put the Giants up 6-5 in the sixth, but Jose Reyes tied it in the bottom half with a broken-bat RBI single over a drawn-in infield.

Reyes drew three walks, one intentional, after coming into the game with eight this season. He finished 3 for 3 with a stolen base.

"He had an outstanding game tonight. He gave us every chance," Collins said.

Playing their first home game since President Barack Obama announced Sunday night that terrorist leader Osama bin Laden was killed by U.S. forces in Pakistan, the Mets donated 4,000 tickets to military members and their families.

New York wore special stars-and-stripes caps, and five members of the armed services threw out ceremonial first pitches, receiving a warm hand from the crowd of 32,288. Marine Corps veteran Sgt. Elizabeth Quinones sang "God Bless America" during the seventh-inning stretch, prompting brief chants of "U-S-A! U-S-A!"

Before the game, Collins said he thought all the servicemen in the stands would give his team "a lot of energy."

"I think there will be a lot of emotions tonight," he said.

But there were several "Let's Go Giants!" chants in the late innings.

For many, the military tributes brought back vivid memories of September 2001, when the Mets hosted the first big league ballgame in New York following the 9/11 attacks.

Exactly 10 days after the Twin Towers fell about 14 miles away, the solemn sound of bagpipes echoed through Shea Stadium, which served as a staging area for relief efforts. A crowd filled with firefighters, police officers and other rescue workers shed tears and later cheered when Mike Piazza hit a go-ahead homer to lift the Mets over Atlanta.

Scores of New York fans still recount that stirring night as one of the most remarkable in Mets history.

NOTES: Collins said the Mets will re-evaluate whether the team's top pitching prospect, Jenrry Mejia, should be a starter or a reliever when he returns from a torn elbow ligament. Mejia has been told he needs surgery but is expected to get a second opinion. ... It was Beltran's first home run from the left side this season. ... New York placed slumping LF Jason Bay on baseball's new paternity leave list and recalled OF Lucas Duda, who started in left. Bay left the team to be with his wife, Kristen, for the birth of their third child and is expected to be gone two days, Collins said. ... Injured outfielder Angel Pagan went 1 for 5 and played nine innings in center field in an extended spring training game. ... Mets pitchers have served up 10 homers in the seventh inning or later this year. ... The Mets said that when C Ronny Paulino got five hits in his first start for the team Sunday night at Philadelphia, it was the first time a major leaguer got five hits in his initial start for a team since Detroit catcher Hank Foiles accomplished the feat on June 27, 1960, according to the Elias Sports Bureau.