SAN FRANCISCO - As he rounded third base, running out of gas and headed for home, San Francisco Giants second baseman Kelby Tomlinson could think of only one thing.
Thank goodness for the so-called "Buster Posey Rule."
Given a clear path to home plate, Tomlinson completed the ninth inside-the-park home run in the history of AT&T Park with a head-first dive Saturday, propelling the Giants to a 3-2 victory over the Colorado Rockies.
"That's one of the most exciting plays in baseball," Giants manager Bruce Bochy said of the inside-the-park homer. "Especially one that's that close at the plate."
Right fielder Marlon Byrd and shortstop Brandon Crawford also had solo homers of the standard variety for the Giants, who beat the Rockies for just the third time in their eight meetings in San Francisco this season.
Right-hander Jake Peavy allowed four hits and one run in five innings to run his personal season-ending winning streak to five games. The veteran has not lost since Aug. 20, a stretch of eight starts.
"I was happy with the way the season played out," Peavy said from a personal standpoint. "I wanted the team to be able to count on me for a quality start every time I went out there down the stretch. And I think I did that.
"I wanted to help the team accomplish our goal. Unfortunately, we all came here to play what we're going to watch next week (the playoffs). We'll use that as fuel."
Peavy (8-6) walked one and struck out two.
One of the hits Peavy allowed was a first-inning double by Rockies third baseman Nolan Arenado. It was Arenado's 89th extra-base hit of the season, extending the record for third basemen he set in Friday's 9-3 win over the Giants.
Left fielder Ben Paulsen homered in the fifth inning, and center fielder Corey Dickerson doubled and scored in the sixth to account for the Rockies' runs.
The home run was Paulsen's 11th of the season.
In losing for the fourth time in its last five games, Colorado totaled seven hits against six Giants pitchers.
The Rockies out-hit the Giants 7-5, but lost the home run battle 3-1.
"Three solo homers. One an inside-the-park," lamented Rockies manager Walt Weiss. "Other than that, I thought (starter Chris Rusin) did a nice job. It's a lot of what we've seen from him this year. (He) puts us in position to win games."
Five San Francisco relievers combined for four innings of one-run relief with closer Santiago Casilla recording his 38th save by getting final two outs.
The win was only the Giants' second in their last five games.
Tomlinson got the Giants off and running on left-hander Rusin's sixth pitch of the game, smacking a liner to the 421-foot mark on the outfield wall in right-center field.
"My first thought was, I hope they don't catch it," said Tomlinson, who had a similar blast tracked down in Friday's loss to the Rockies. "When it lands, you're thinking triple."
Instead, Tomlinson made it 90 feet farther, diving head-first to beat a relay throw at the plate for his second home run of the year.
"Back in the old days, you'd see a catcher standing right there," he noted. "Having to give me a lane probably helped."
The inside-the-park homer was just the sixth for a Giants' player since AT&T Park opened in 2000. The most recent previous inside-the-park homer had been hit by a Rockies outfielder -- Brandon Barnes -- on June 14, 2014.
Byrd's homer, his 23rd of the season, came two batters later and gave the Giants a 2-0 lead. It was his fourth home run since joining the Giants on Aug. 20.
Crawford added to the lead with his solo shot in the fourth. It was his team-leading 21st of the season.
Rusin (6-10), who fell to 0-7 on the road this season, allowed all three of the homers and just two other hits in six innings. He walked two and struck out four.
"It was just those three pitches (the homers). They were my three biggest mistakes," Rusin said. "They didn't miss any one of them. I wish I had those three mistakes back."
Tomlinson, who also had a third-inning double, was the only player in the game with two hits.
NOTES: The Giants honored retiring RHP Tim Hudson in a 25-minute, on-field ceremony before the game. Hudson is walking away after 17 seasons with 222 wins, tops among active pitchers in the majors. ... Giants LHP Madison Bumgarner had a pinch-hit single in the fifth inning. ... Having used Sunday's scheduled starter, RHP Yusmeiro Petit, in relief on Friday, the Giants have switched to RHP Matt Cain to start Sunday's regular-season finale. ... Rockies 3B Nolan Arenado enters the final day of the season with 10 home runs and 24 RBIs against the Giants this year. The only previous players ever to post 10/24 seasons against the Giants were Brooklyn Dodgers 1B Dolph Camilli (11 homers, 30 RBIs) in 1941, Brooklyn Dodgers C Roy Campanella (10 homers, 28 RBIs) in 1953 and St. Louis Cardinals OF Stan Musial (12 homers, 27 RBIs) in 1954.