NEW YORK -- Torii Hunter had already seen the way Oliver Perez wanted to pitch to him with runners on base by the time he came up in the fifth inning Wednesday night.
Perez wasn't about to fool Hunter again.
"With Perez, he's pounding the fastball in on the right-handers and he does it well," Hunter said. "I couldn't do much with it the first two times and (you) just make the adjustment. That's what you have to do.
"He threw the fastball in -- I knew what was coming so I was lucky."
Scott Baker pitched five effective innings and Joe Mauer also drove in two runs for Minnesota, which won two of three in its first series at Shea Stadium since 2002. Johan Santana tossed a four-hitter in the Twins' 9-0 victory Tuesday night and Baker allowed two runs and seven hits in the finale.
"All the little things worked out tonight for us and we get out of here winning two out of three," manager Ron Gardenhire said. "That's pretty good."
Carlos Beltran went 3-for-4 and singled in a run for the foundering Mets, who have lost 13 of 16. New York has dropped six straight series since it took two of three games against San Francisco from May 29-31.
"We're going through a tough time right now," manager Willie Randolph said. "But mama said there would be days like this. Or weeks -- that, too. It's not earth-shattering. Other teams around the league are struggling, too. Most of our guys are struggling at the same time."
Baker (2-2) struck out three and walked none in his first win since May 19. He had allowed 17 runs in 13 1/3 innings over his previous three starts.
"Nothing, technically, was different," Baker said. "I didn't try to make any adjustments mechanically or emotionally or anything. It just worked out tonight. I made a couple better pitches than I did the other night."
Dennys Reyes, Matt Guerrier, Pat Neshek and Joe Nathan combined to throw four scoreless innings of relief for the Twins.
David Wright hit an RBI single to put New York ahead 2-1 in the third, but Perez (7-6) couldn't preserve the lead.
Perez threw 7 1/3 innings in a 2-0 victory over Roger Clemens and the New York Yankees in his previous start but struggled with his control against the Twins. He had to wiggle out of several jams in the early going.
Hunter came up with runners on first and third in the first and struck out to end the inning. Justin Morneau hit a two-out RBI triple in the third and was stranded there when Perez got Hunter to bounce out to third.
Hunter finally got the best of Perez in the fifth. With two outs and Mauer on third, Hunter pulled a 1-2 pitch over the wall in left field to give Minnesota a 3-2 lead. His 15th homer of the season snapped a 1-for-15 skid.
"I was all over the plate," Perez said. "I walked too many guys. The pitch against Hunter was a little bit up and he has really good power."
Pinch-hitter Mike Redmond had an RBI single in the sixth and Mauer lined a two-run double into left-center to make it 6-2.
Perez allowed four runs and five hits in 5 1/3 innings. He walked five and struck out three, throwing 110 pitches. He had worked at least seven innings in six of his previous seven starts.
"We told ourselves to make him work a little bit, try to get a good pitch," Gardenhire said. "He's got great stuff and he's very competitive. You see that out on the mound so you have to try to force the issue and work him a little bit."
Twins broadcaster and former big league pitcher Bert Blyleven got a haircut before the game, courtesy of Santana. Blyleven said he would shave his head if Santana threw a shutout against the Mets, and the two-time Cy Young Award winner pulled it off Tuesday. "So what are we going to do next time?" a smiling Santana said before he shaved Blyleven's head in the middle of the visitors' clubhouse. ... Minnesota 2B Luis Castillo doubled in the first inning to end a career-worst 0-for-21 skid. ... Mets SS Jose Reyes singled in the third to extend his hitting streak to 11 games.