Anibal Sanchez waited more than two months for his next win. Another late rally by the Colorado Rockies nearly spoiled his celebration.

Sanchez tossed eight strong innings to win his first game since June 10 and the Florida Marlins held on to beat the Rockies 6-5 Tuesday night.

"I waited for a long time that game," Sanchez said. "I'm excited for my No. 7."

Sanchez (7-6) was sharp in earning his first victory since beating Arizona and continued his dominance of the Rockies, who he nearly no-hit in April. He scattered five hits and struck out seven, improving to 3-0 in four starts against Colorado.

"My last start was terrible. I felt good today," Sanchez said. "I didn't try to do anything extra, I didn't want to throw any harder, I just wanted a lot of command."

His only blemishes were allowing home runs to Troy Tulowitzki, Carlos Gonzalez and Seth Smith.

"Aside from the home runs, he pitched outstanding," Florida manager Jack McKeon said. "He kept the damage down to solo home runs."

Sanchez's victory came after a second straight ninth-inning rally off closer Leo Nunez.

A night after he hit a walk-off three-run homer, Jason Giambi hit a pinch-hit two-run homer off Nunez with two outs in the ninth. Ty Wigginton followed with a single before Nunez got Dexter Fowler to pop out to nail down his 33rd save.

"We didn't care about Giambi hitting the home run. Throw him a strike, let him hit it," McKeon said. "He can't tie us and he can't beat us."

Mike Stanton homered for the third straight game and Bryan Petersen had two triples for the Marlins, who grabbed the early lead and padded it to survive Giambi's heroics. They jumped on starter Jhoulys Chacin in the first inning when Petersen tripled with one out, Stanton walked and Greg Dobbs singled to make it 1-0. After a strikeout, Mike Cameron singled to left to give the Marlins a 3-0 lead.

Florida loaded the bases on two walks but Chacin got Sanchez to ground out to end the inning.

"Jhoulys was almost out of the first inning with only one run surrendered but Cameron got the two-out base hit," Rockies manager Jim Tracy said.

The Rockies got two back in the bottom of the second on solo homers from Tulowitzki and Smith. It was Tulowitzki's 25th homer.

The Marlins stretched the lead in the fourth. Light-hitting Jose Lopez led off with a double and scored on Emilio Bonifacio's single to left. Petersen followed with his second triple to make it 5-2.

That was all for Chacin (9-10), who allowed five runs on eight hits, struck out four and walked three.

Gonzalez led off the bottom of the fourth with his 19th homer to cut the lead to 5-3.

"The three home runs, I think it's because of the ballpark," Sanchez said. "My pitches don't work like in other ballparks. I tried to keep the ball down."

Tulowitzki followed Gonzalez's blast with a double but the Rockies couldn't cash in. Sanchez allowed only one more hit in his last four innings.

"The guy has pretty good stuff. He has the good fastball and cutter and has a good sinker and he keeps his breaking ball down in the zone," Gonzalez said. "That's what makes it hard to get a hit off that guys.

Stanton hit his 28th homer to lead off the seventh.

NOTES: Colorado RHP Juan Nicasio talked publicly for the first time since suffering a fractured vertebra after getting hit by a line drive on Aug. 5. ... Marlins INF Omar Infante (fractured right middle finger) will join the team in San Diego on Friday. ... The Rockies will send RHP Aaron Cook to the mound in the series finale Wednesday. Cook has lost his last two starts and has received little offensive support of late. The Rockies have scored just three runs in his last four starts. ... Ricky Nolasco will pitch for Florida on Wednesday. Nolasco needs just three strikeouts to pass Dontrelle Willis for first in club history in career strikeouts. ... Petersen has three triples in two games.