ST. LOUIS (AP) -- Carlos Martinez pitched seven sharp innings, Jedd Gyorko hit his 29th homer, Brandon Moss homered to break out of a big slump and the St. Louis Cardinals stayed in the middle of the NL wild-card race.
All that, but the most memorable moment in the Cardinals' 7-0 victory over the Pittsburgh Pirates on a rainy Friday night was provided by Matt Holliday.
Holliday launched a pinch-hit home run in the seventh inning in what could have been his final at-bat after 7 1/2 seasons in St. Louis.
Holliday was given a standing ovation before he stepped into the batter's box and was called out for a curtain call after he drove an 0-2 fastball into the right-field bullpen for his 20th homer.
''I still have chills,'' Cardinals manager Mike Matheny said. ''It was a great crowd and every one of them made that extremely special for him. It meant a great deal to him, probably more than what words can describe.''
Said longtime teammate Adam Wainwright: ''You can't make that stuff up.''
''Everybody in the dugout was saying, man, it would be cool if he hit a home run. And he did it on an 0-2 pitch. You just don't see that.''
Holliday, out since Aug. 12 because of a thumb injury, was activated off the disabled list at his request Friday. The club informed him earlier this week that it is not planning to pick up the $17 million option on his contract for 2017, and instead will pay him the $1 million buyout.
Holliday had left the clubhouse before the media was allowed in.
The Cardinals began the day trailing San Francisco by one game for the second NL wild-card spot. The Giants played host to the Los Angeles Dodgers.
''It was special for me watching it as an outsider,'' Pirates manager Clint Hurdle said. ''The career for him is not over but what a reception from a baseball town.''
Holliday became the sixth Cardinals player to reach 20 homers this season, tying an NL record. It was the first pinch-hit homer and RBI of Holliday's career and was the 17th overall by St. Louis this year, extending its major league mark.
Martinez (16-9) gave up five singles, walked one and struck out nine in his career-high 31st start. John Jaso led off the second with a single and was the only runner to reach third base against Martinez, who left with a 3.04 ERA.
''I'm been pleased with my starts all year,'' said Martinez, who said he dedicated the game to his friend Jose Fernandez, the Miami Marlins pitcher killed Sunday in a boating accident. ''I feel comfortable on the mound. It's not just a physical thing but being able to go out there and be comfortable.''
Tyler Glasnow (0-2) finished his rookie season with his most effective start, working five innings and giving up Gyorko's homer. Glasnow did not allow another Cardinal past second.
The Cardinals took a 5-0 lead in the sixth with four runs off reliever Trevor Williams. Yadier Molina and Stephen Piscotty doubled in runs and Moss hit a two-run homer, his 28th.
Pirates: LF Starling Marte (back) was not in the lineup and is not expected to play in the final two games.
Pirates: RHP Chad Kuhl (5-4, 4.25 ERA) lasted two innings in his only start against the Cardinals, a 12-6 loss on Sept. 5.
Cardinals: RHP Michael Wacha (7-7, 4.93) has allowed 10 earned runs in 5 2/3 innings over three relief appearances since returning from the DL. He was picked to start Saturday's game against the Pirates instead of struggling LHP Jaime Garcia.