AP photo by John Bazemore / Chad Wallach scores for the Miami Marlins on a Jon Berti double as the ball gets away from Atlanta Braves catcher Travis d'Arnaud during the sixth inning Thursday night in Atlanta.

ATLANTA — Miami Marlins pitcher Pablo López delivered big in a must-win situation, even after a long rain delay gave the right-hander and his teammates more time to think about what was at stake.

Jon Berti had three hits, including a two-run double, and López allowed only two hits in five scoreless innings as the Marlins beat the Atlanta Braves 4-2 Thursday night to boost their playoff hopes.

Miami snapped a four-game losing streak. The Marlins (29-28) are competing for a wild-card spot as they try to reach the playoffs for the first time since winning the World Series in 2003.

"It means a lot," López said. "Obviously, every game is important in a short season like this one, but we knew coming into this one today this was the biggest one so far."

The Marlins can control their playoff status when they close the regular season with a three-game road series against the New York Yankees that starts Friday. Marlins manager Don Mattingly said every game carries added pressure.

"Its just tough, I'm telling you," Mattingly said. " These are stressful games. I don't think there's any getting around it."

The Braves, who had won four straight games, were denied a chance to clinch the National League's No. 2 seed in the playoffs.

Dansby Swanson's bases-loaded single off Brandon Kintzler in the eighth inning drove in two runs. Kintzler worked around a one-out walk to Freddie Freeman in the ninth to earn his sixth save this season.

The Braves scored a combined 25 runs while winning the first three games of the series, but they committed a season-high four errors in the finale.

López (6-4) had six strikeouts and two walks.

Braves rookie right-hander Ian Anderson (3-2) threw five scoreless innings before giving up three unearned runs in the sixth. Brian Anderson opened the inning with a broken-bat liner. Third baseman Adeiny Hechavarria dropped the liner for an error as the barrel of the bat landed a few feet away.

A single by Garrett Cooper left runners at first and third. Ian Anderson struck out Matt Joyce and Miguel Rojas before Chad Wallach's single to right field drove in Brian Anderson. Berti's two-run double knocked the Atlanta starter out of the game.

The young pitcher said he still considered it a quality final warmup for his expected start in the second game of the playoffs.

"I thought it was good," he said. "I stayed on the attack all night and was pounding the zone, getting weak content and good results. Definitely happy with how it went."

Jesus Aguilar homered off A.J. Minter in the seventh.

After already clinching its third straight division title, Atlanta's focus is on preparing its rotation for the postseason after Max Fried tweaked his left ankle during the first inning of Wednesday night's game. Tests on Fried's ankle were negative for serious injuries Thursday, raising hopes he'll be ready to start the opener of the wild-card series.

The Braves will play the full series at Truist Park, beginning next Wednesday. Atlanta manager Brian Snitker said "I think everybody feels it's a realistic possibility" that Fried will have sufficient time to recover.

Fried's injury came one day after the Braves learned Cole Hamels is done for the season. He made only one start after battling shoulder trouble all year.

The Braves lost No. 1 starter Mike Soroka last month to a season-ending torn right Achilles' tendon. Former All-Star pitcher Mike Foltynewicz and Sean Newcomb were demoted due to poor performance.

Braves third baseman Austin Riley was held out for the second straight day to rest a minor quadriceps injury, though Snitker said Riley said he was ready to play Thursday.

The start of the game was delayed 1 hour, 39 minutes by rain. The long wait helped to avoid rescheduling the game for Monday — the first day after the scheduled end of the regular season. There was more rain and wind during the game.

Swanson was charged with his second error of the season on a throw to first.

"That ball was hard to get a hold of," Snitker said. " Coming off that grass, it was pretty slick. It was a tough night especially early. Everything was wet and both teams did a good job of not letting it get to them."

Hechavarria committed two errors in his second straight start.

Major League Baseball commissioner Rob Manfred unveiled the logo for the 2021 All-Star Game, to be played at Truist Field, in a video presentation before the game.

Atlanta opens a three-game series against the Boston Red Sox on Friday night with right-hander Kyle Wright (2-4, 5.74) making his eighth start this year for the Braves.