MLB

Brown rallies Mets past Diamondbacks 5-4 in 13

Finally, a marathon for the Mets that ended in exhilarated exhaustion.

After losing to the Marlins in 20 and 15 innings earlier this season, last night’s 5-4 victory over the Diamondbacks on Andrew Brown’s walk-off single in the 13th was plenty bearable for the Mets.

Cody Ross’ solo homer in the 13th inning off David Aardsma put the Diamondbacks ahead before Josh Satin started the winning rally with a double off Josh Collmenter in the bottom of the inning. John Buck was intentionally walked, and Matt Harvey entered as a pinch-hitter for Aardsma. Harvey’s sacrifice bunt moved runners to second and third before Omar Quintanilla was intentionally walked and Brown won it.

The Mets also got a huge performance from their bullpen, with Carlos Torres, Josh Edgin, LaTroy Hawkins, Bobby Parnell and Aardsma allowing one run over seven innings behind starter Shaun Marcum.

Nobody had a more frustrating night than Buck, who finished 0-for-4 with three strikeouts and left five runners stranded.

The Mets had plenty of chances to win the game earlier. They loaded the bases on three walks in the 11th inning before Quintanilla was retired by lefty Tony Sipp to end the threat.

Quintanilla was left stranded in scoring position in the 10th inning, after Eric Young Jr. and Daniel Murphy were retired in order against reliever Chaz Roe.

Satin’s RBI single in the ninth against J.J. Putz scored Marlon Byrd with the tying run. Byrd doubled with one out — nearly clearing the left-field fence to tie the game — and wasn’t stopping on Satin’s single to left moments later. Ross’ throw home beat Byrd, but catcher Miguel Montero couldn’t hold on. The Mets’ chance to win the game in the ninth died when Buck was thrown out at second trying to advance on a ball that had squirted away from Montero.

The Mets had a big opportunity in the eighth, when Young’s RBI double sliced the Diamondbacks’ lead to one, but Murphy left the tying run at third base when he popped out against David Hernandez.

It was a rally that started with Quintanilla’s triple, on a ball that Gerardo Parra nearly caught crashing to the ground on the warning track in right. Parra remained on the ground for several minutes and eventually walked off the field with an evident shoulder injury. Young doubled moments later to bring the Mets within 3-2.

Marcum rebounded from a shaky start to last six innings, in which he allowed three earned runs on six hits and three walks. The veteran righty had his best performance of the year in his previous start, pitching eight shutout innings against the White Sox at U.S. Cellular Field for his first victory of the season.

David Wright’s RBI single in the seventh finally got the Mets on the board, but there could have been more damage done. Byrd’s broken-bat single put the tying runs on base, but Heath Bell retired Satin and Buck to keep the Diamondbacks’ lead at 3-1.

The Mets were mostly lost at the plate with runners in scoring position. Buck and Juan Lagares struck out in succession against starter Wade Miley after Satin doubled to open the sixth. Quintanilla then walked, before pinch-hitter Kirk Nieuwenhuis whiffed against reliever Brad Ziegler.

The Mets squandered early chances against Miley. In the first inning, Buck was caught looking at strike three with the bases loaded to end a threat. The next inning, Young and Murphy struck out back-to-back to leave runners on second and third. Lagares had doubled leading off the inning and went to third on Quintanilla’s single. Marcum then bunted, moving Quintanilla to second, but trading in an out.

Aaron Hill’s RBI single in the second extended the Diamondbacks’ lead to 3-0. Didi Gregorius singled leading off the inning and took second on Miley’s sacrifice bunt before Hill delivered the run.

Paul Goldschmidt’s two-run homer in the first quickly put Marcum in a hole. Hill was hit by a pitch before Goldschmidt, an early MVP candidate, unloaded his 20th homer of the season.

Marcum walked Ross later in the inning and Eric Chavez singled, but the right-hander avoided further damage by retiring A.J. Pollock.

mpuma@nypost.com