MIAMI (AP) — It was a milestone night for Ryan Howard and Chase Utley.

The Philadelphia Phillies had nothing else to celebrate.

Howard set a team record by playing first base for the 1,299th time, Utley hit a three-run homer in his 1,500th game, and it wasn’t enough. Giancarlo Stanton scored from first on Marcell Ozuna’s double in the ninth, and the Miami Marlins beat Philadelphia 4-3 on Friday night.

Stanton led off the ninth with a walk off Ken Giles (1-1), and Ozuna quickly ended what became the Phillies’ fourth straight loss.

“Walks have come back to haunt us, that’s been the story the last four or five games,” Phillies manager Ryne Sandberg said. “Can’t end up walking anybody, they end up scoring each time and again tonight. Two of the walks were runs. We’ve been having problems with that.”

It was Ozuna’s third double and fourth hit of the night, bouncing off the wall in left-center. Stanton never broke stride and just beat Carlos Ruiz’s tag, the safe call getting reviewed and ultimately upheld to seal Miami’s eighth win in its last nine games.

Dee Gordon had three more hits and raised his average to .423 for the Marlins.

Steve Cishek (1-1) gave up a two-out triple in the ninth to Cody Asche, but escaped by getting Ruiz to ground out and keep the game tied.

“It continues to show the character of this team,” Marlins manager Mike Redmond said. “Things don’t go our way, but we keep battling.”

Miami starter Tom Koehler faced the minimum nine batters through three innings, then faced all nine again in the fourth — and was fortunate he didn’t see more. Utley’s third home run of the season gave Philadelphia a 3-1 lead and the Phillies had the bases loaded later in the inning.

But Koehler fanned Freddy Galvis on a breaking ball that catcher J.T. Realmuto blocked in the dirt. And after Koehler’s first pitch to Phillies’ starter Jerome Williams skipped off Realmuto’s glove to the wall, Realmuto got it back to Koehler in time to tag Howard — trying to score from third — and end the inning.

The Phillies didn’t like the call, but it was upheld after review.

“I pulled my hand back and he just went straight down,” Howard said. “I didn’t feel anything.”

Howard broke the games-at-first team mark held by Fred Luderus. And Utley is now one appearance shy of tying Granny Hamner for No. 10 on the Phillies’ all-time list.

Howard made a big play at first on his big night, diving left to snare a throw from Utley while keeping his right foot on the bag to complete a 5-4-3 double play after Miami loaded the bases — but came up scoreless — in the sixth.

(© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)