Brad Penner-USA TODAY Sports

Tylor Megill carried a shutout into the eighth inning Saturday afternoon, when the host New York Mets withstood a late comeback by the Philadelphia Phillies to earn a 4-3 victory in the opener of a doubleheader.

The Mets (73-86) won for just the third time in nine games. Pete Alonso had a run-scoring groundout in the first, when Brett Baty added an RBI single and Francisco Lindor scored on a wild pitch. Omar Narvaez homered in the second.

Edmundo Sosa had a run-scoring single in the eighth while Brandon Marsh (double) and Weston Wilson (single) each had RBIs in the ninth for the Phillies (89-71), who will be the top National League wild card when the playoffs begin next week.

J.T. Realmuto had a pair of singles as Philadelphia lost its second straight following a seven-game winning streak.

Megill (9-8) surrendered one run on four hits and two walks while striking out seven over 7 1/3 innings. Brooks Raley got the final two outs of the eighth before Adam Ottavino notched his 12th save despite giving up the ninth-inning runs.

Taijuan Walker (15-6) gave up four runs on four hits and four walks while striking out three over seven innings. He retired 12 straight batters between the third and sixth and 16 of his final 18 overall.

The Mets immediately went ahead against Walker in the first. Rafael Ortega and Ronny Mauricio opened the game with singles before Ortega scored on Alonso's ground out to third. Francisco Lindor walked and DJ Stewart popped out before Baty singled home Mauricio.

Lindor, who went to third on the hit, then raced home on a wild pitch.

Narvaez led off the second with his second homer of the season.

The Phillies didn't get a runner beyond first base until Wilson and Jake Cave opened the eighth with consecutive singles. Megill exited after retiring Cristian Pache on a fly out to left, after which Raley struck out Kyle Schwarber. Sosa followed with his RBI single and Raley whiffed Bryce Harper on five pitches.

Realmuto walked leading off the ninth, moved to second on Bryson Stott's groundout and scored on Marsh's double. Marsh came home on the single by Wilson, who stole second and third but was left there when Cave whiffed and Cristian Pache flew out.

More must-reads:

TODAY'S BEST
Hall of Famer, legendary Raiders offensive lineman dead at 86
Report: Cavs owner 'would never' trade Donovan Mitchell to this team
Kim Mulkey adds legendary LSU alum to coaching staff
Insider details LeBron James' role in Lakers' head-coaching search
Cardinals switch up offensive line, move 2023 first-rounder to new position
Commanders poach another key overseer of Lions rebuild
Commanders to hire veteran executive as player personnel director
Guardians designate outfielder for assignment
Patriots' Drake Maye starts OTAs in surprising position
Bettors are buying Bronny James hype before the 2024 NBA Draft
Mets release veteran infielder
Anderson Silva, Chael Sonnen will finish off their trilogy in a boxing ring
Victor Wembanyama, Chet Holmgren highlight 2023-24 All-Rookie team
Jaguars' Doug Pederson discusses Trevor Lawrence contract extension
Saints, star CB 'moving forward' following trade chatter
Pacers ride historic shooting performance to Game 7 blowout of Knicks
Timberwolves mount incredible second-half comeback to stun Nuggets in Game 7
Xander Schauffele proves doubters wrong with historic win at 2024 PGA Championship
Four things we learned from Joey Logano's All-Star Race win at North Wilkesboro
Phil Foden lifts Manchester City to fourth consecutive English Premier League title

Want more MLB news?

Join the hundreds of thousands of fans who start their day with Yardbarker's Morning Bark, the best newsletter in sports.