NEW YORK - A foreboding matchup Monday night resulted in a surprising and euphoric win for the New York Mets. Now the Miami Marlins are hoping their fortunes can change in an instant.

The resurgent Mets will host the slumping Marlins on Tuesday night in the second game of a four-game series at Citi Field. New York won Monday night's opener 2-1 when Yoenis Cespedes hit a long solo homer in the bottom of the 10th inning.

With the win, the Mets (67-64) tied the Marlins for second place in the National League East. Both teams are 2 1/2 games behind the St. Louis Cardinals in the race for the second NL wild card spot.

More from FoxSports

The Mets' victory came on a night in which the Marlins had the decided edge in starting pitching. While Miami sent All-Star Jose Fernandez to the mound, New York countered with right-hander Rafael Montero, who was promoted earlier in the day from Double-A Binghamton to make his first start in the majors since April 2015.

But Montero threw five scoreless innings despite allowing three hits and six walks. A quintet of Mets relievers combined to allow just three hits in the final five innings and Jose Reyes built the tying run in the eighth when he doubled, took third on a flyout and scored on a wild pitch.

"It's got to be a team effort," Mets manager Terry Collins said. "Everybody's got to pull on their end of the rope. We can't turn to just one entity and say 'This is how we're going to win. This is how we're going to get back in this.' It's got to be both sides of the ball, it's got to be pitching, defense. We've got to come up with some big hits."

The Marlins could use some big hits in the worst way. Miami has scored just two runs during a three-game losing streak and is 3-6 in its last nine games, a stretch in which it has only been outscored 21-20.

"In this type of situation that we're in, no matter (what), this cloud looks pretty dark, and it changes in three days or it changes in two days," Marlins manager Don Mattingly said. "You put some runs up and you (get) momentum going in that direction and then you're hot.

"We're going to come out of that and put some runs on the board."

Mets right-hander Seth Lugo is scheduled to oppose Marlins right-hander Tom Koehler.

Lugo, who is making his third big league start, posted his first career win last Thursday, when he threw five shutout innings against the St. Louis Cardinals in New York's 9-4 victory. He has allowed just three runs in 11 2/3 innings in his first two starts.

Koehler had his six-start unbeaten streak snapped in his most recent start last Thursday, when he gave up four runs (three earned) in six innings as the Marlins fell to the Kansas City Royals 5-2. The 30-year-old right-hander, who grew up about an hour north of Citi Field in New Rochelle, N.Y., will be making his 10th appearance and ninth start at Citi Field, where he has pitched more often than any other road ballpark.