NEW YORK -- Josh Satin had the thought in the back of his mind. Sergio Romo had thrown him four straight sliders. With the count at 2-2, Satin figured there was a chance Romo would throw him a fastball, though he wasn't necessarily expecting it.
Just keeping that in mind turned out to be enough.
"He threw a fastball inside and I was ready for it," Satin said.
Satin drove a two-run, walk-off single into left field in the ninth inning Wednesday night to send the Mets to a 5-4 win against the Giants. New York did suffer a disappointing injury, though, as Ruben Tejada left the game after the top of the ninth with a broken right fibula from a collision with Andrew Brown in shallow left field.
The Mets' offense was mostly dormant until the ninth. San Francisco starter Matt Cain allowed only one unearned run on six hits over 7 2/3 innings.
But the Mets clawed their way back against Santiago Casilla and Romo.
Casilla walked Brown and Juan Lagares to put runners on first and second. San Francisco manager Bruce Bochy then brought Romo on to try to nail down the win.
"I was trying to give [Romo] a break, but we walked a couple of guys," Bochy said.
Romo couldn't shut the Mets down, either.
Pinch-hitter Zach Lutz doubled down the third-base line to drive in Brown, cutting San Francisco's lead to 4-2. Juan Centeno, who picked up his first Major League hit earlier in the game, then drove in Lagares with a single.
After walking Matt den Dekker to load the bases, Romo got pinch-hitter Omar Quintanilla to fly out to right. That brought Satin to the plate for his walk-off heroics.
"He's done an outstanding job. He's a good hitter," manager Terry Collins said. "He went through a little bit of a slump a couple weeks ago, but it's going to happen. It happens to everybody. For the most part, he'll put a good at-bat on you. That's what he did tonight."
Satin singled off Romo in the ninth inning on Tuesday and said that at-bat helped him a night later.
The at-bats the Mets put together in the ninth reflected their overall offensive objective: grind out at-bats, wait for a good pitch to hit.
"We just got one good at-bat after another," Collins said. "That is exactly what we're trying to do, and the results in that inning were great. I think if you do that over the course of a season, you're going to find you're going to get on base and you're going to score more runs."
Pulling out the win also erased what had been an ugly game.
Aaron Harang lasted only five innings, allowing four runs (three earned) on six hits with three walks and eight strikeouts. He surrendered a two-run home run to Gregor Blanco in the third inning to put the Mets in an early hole. The Mets' shoddy defense didn't help him.
Satin and Brown each committed an error in the fourth that eventually cost the Mets a run. San Francisco scored again in the fifth inning, but Carlos Torres, David Aardsma and Vic Black combined for four scoreless innings after that.
With the way Cain was pitching, the Mets didn't look poised to rally. But they battled back late and won in walk-off fashion for the second time in three games after Travis d'Arnaud delivered on Sunday.
"That is what this game's about at this level," Collins said. "I don't care where you came from, you're in this clubhouse now and that's what expected. I thought tonight this may be a big win for us."
For a team full of players looking to prove they belong in the Major Leagues, these types of wins can go a long way.
"It was awesome. We're all a bunch of young guys trying to show what we can do and come together as a team," Satin said. "To battle through adversity and come back like that is awesome."
Chris Iseman is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.