NEW YORK — Catcher J.T. Realmuto played in his last game of the season Friday. He wasted absolutely no time preparing for his next task: managing the Miami Marlins in the season finale on Sunday.

Marlins manager Don Mattingly is handing the reins to Realmuto when Miami closes out 2018 by visiting the New York Mets in a battle of the National League East’s fourth- and fifth-place teams at Citi Field.

The Marlins’ Sandy Alcantara (2-2, 4.00 ERA) is scheduled to oppose the Mets’ Noah Syndergaard (12-4, 3.22 ERA) in a matchup of right-handers.

The Mets posted a 1-0, 13-inning victory Saturday night when Austin Jackson‘s walk-off RBI double ensured David Wright would exit a winner in his final big-league game. Wright, whose pinch-hitting appearance Friday was his first major league at-bat since May 27, 2016, went 0-for-1 with a walk before leaving to a standing ovation in the top of the fifth inning.

Wright, who has undergone neck, back and shoulder surgeries since 2016 and is battling spinal stenosis, said earlier this month that he can no longer physically play baseball. It is believed he and the Mets (76-85) will negotiate a settlement on the remainder of his contract, which runs through 2020.

“I’m at peace with the work and the time and the effort and the dedication that I put into this,” Wright said afterward. “I’m certainly not at peace with the end result, but tonight was special.”

The Marlins (63-97) are hoping for a memorable afternoon when Realmuto slides into Mattingly’s spot on the bench. Mattingly tries to let a player manage the season finale when the game has no playoff implications, a tradition he learned while serving as a coach with the New York Yankees under Joe Torre.

Infielder Martin Prado was the Marlins’ manager in the season finale last year, which Mattingly said was an eye-opening experience for the player.

“Prado’s like ‘I’m never going to question you again,’ there was so much stuff going on in that game he managed,” Mattingly said with a grin Saturday afternoon. “It’s good for them to see the other side a little bit.”

Mattingly said Realmuto jumped right into managerial mode after the Marlins’ 8-1 win Friday night.

“He told me (Friday) night that we had to talk about who I used out of the bullpen (Saturday), because he wanted to keep certain guys available for (Sunday),” Mattingly said. “He was taking over. He took over as soon as the game’s over (Friday) night.”

Alcantara took the loss in his most recent start last Monday, when he gave up six runs in four innings as the Marlins fell to the Washington Nationals 7-3. Syndergaard didn’t factor into the decision Tuesday, when he allowed three hits in six scoreless innings as the Mets lost to the Atlanta Braves 7-3.

Alcantara is 1-0 with a 2.25 ERA in two career starts against the Mets. He beat the Mets on June 29 when he gave up one run in five innings and allowed two runs in seven innings of a no-decision on Sept. 13.

Syndergaard is 5-0 with a 1.96 ERA in seven career starts against the Marlins. This season, he’s 2-0 against them and has allowed four earned runs in 13 innings.