NEW YORK -- Pedro Alvarez had lots of people at Citi Field rooting for him to go long.
"Any time I can hit a home run at home, it's always special," he said.
Alvarez drove in four runs, to the delight of his own personal cheering sections scattered around the ballpark. Among those who always encourage him is his sister, who once worked for the Mets.
|More on Pirates-Mets|
|More MLB coverage|
"Every time I looked up, I saw someone else," he said.
Wandy Rodriguez settled down after a shaky start as the Pirates ended New York's four-game winning streak.
Pittsburgh avoided elimination in the playoff race, remaining mathematically in contention for the second NL wild-card spot. The Pirates posted their 76th victory, the team's most since 1999 when they won 78.
David Wright lined his 20th homer and added a two-run single, tying the Mets' career record of 1,418 hits set by Ed Kranepool. Justin Turner and Wright connected in the first inning for the team's first set of consecutive home runs this season.
"I'm not comfortable talking about something individual like this when we've had our struggles in the second half, not having done what all of us thought we were capable of doing," Wright said. "But I'll enjoy it at some point. Probably not tonight."
Alvarez hit a three-run shot that made it 4-0 in the first inning. He drew a bases-loaded walk in the fifth, and the Pirates went on to win for just the sixth time in 24 games.
Tied for the NL Central lead a week after the All-Star Game, Pittsburgh (76-78) has faded to seventh place in the wild-card standings and is trying to avoid a 20th straight losing season.
Garrett Jones hit his 25th homer and drove in three runs for the Pirates.
Rodriguez (12-13) recovered from a rocky first and left in the seventh with a 7-3 lead. He improved to 5-4 since being traded from Houston to Pittsburgh in late July.
Rodriguez threw 45 pitches in the first inning, so many that a reliever began warming up. Rodriguez ran the bases the next inning and Pirates manager Clint Hurdle said that helped his pitcher, who came out "a little too strong."
The Mets got one hit off Rodriguez after the opening inning, reversing his early struggles.
"It was dramatic," Hurdle said.
The Pirates backed their pitchers with several nice defensive plays. Center fielder Andrew McCutchen bumped into the padded wall after a catch, Jones rushed in from right field for a tumbling grab and shortstop Clint Barmes charged a slow grounder for an out.
McCutchen went 1 for 3 with two walks and is hitting .336. He is only behind San Francisco's Melky Cabrera, who is at .346 but has taken himself out of consideration for the batting title after being suspended for testing positive for a performance-enhancing drug.
Collin McHugh (0-3) was pulled soon after Josh Harrison's two-run triple in the second. Harrison later scored on an error by Turner at second base.
Turner was involved in a play in the third that prompted arguments from both managers. He reached on a throwing error by Harrison from second base, made a brief turn toward second and casually returned to first. Hurdle contended first baseman Gaby Sanchez tagged Turner before he got back to first and, after all four umpires huddled, they agreed and called him out. Mets manager Terry Collins then disputed the call with three umps, to no avail.
Mets LHP Robert Carson left after one batter in the seventh with a strained left elbow. X-rays were negative and he will have an MRI on Wednesday. Before the game, he wore a batting practice jersey with "Pookie-Nookie" on the back -- his mom's nickname for him. ... The Pirates lead the NL with 101 road home runs. ... Mets OF Jason Bay was out of the lineup because of back stiffness. ... Alvarez joined McCutchen with 30 homers this year. The last time the Pirates had two 30-HR players was 2001 with Aramis Ramirez and Brian Giles. ... Pirates pitchers have struck out six for a franchise record of 1,127. The 1969 staff, led by Bob Veale and Dock Ellis, fanned 1,124. ... Mets knuckleballer R.A. Dickey will try for his 20th win Thursday afternoon vs. Pittsburgh. Collins says Dickey will make his final start next week at Miami on either the last day of the season or next-to-last day.