Peyton Burdick hit a tiebreaking RBI double that scored Fortes, who had singled against Padres reliever Luis Garcia (4-6) and advanced on a groundout before Burdick's opposite field line drive bounced inside the foul line in right.
''I was just trying to stay inside and shoot it the other way,'' Burdick said. ''That's what I was working on and it worked today.''
The Marlins ended a stretch of scoring three runs or less at 16 games, the second-longest drought in the division era. Miami also clinched its first series win at home since a three-game sweep of Colorado on June 21-23.
''I felt there were a lot of guys involved,'' Marlins manager Don Mattingly said. ''A lot of good things happened.''
Down 3-0, the Padres tied it on Manny Machado's three-run double in the seventh. Miami reliever Andrew Nardi, making his major league debut, allowed singles to Ha-Seong Kim and Jurickson Profar and walked Juan Soto. Elieser Hernandez (3-6) relieved Nardi, and Machado hit a one-out liner that bounced toward the warning track in left-center.
Dylan Floro followed Miami reliever Richard Bleier after Soto's leadoff single in the ninth. Machado singled before Floro struck out Josh Bell, Jake Cronenworth and Wil Myers for his third save.
The Padres were 1 for 12 with runners in scoring position and stranded 12 runners. They are 7-8 since acquiring All-Stars Soto and Bell at the trade deadline Aug. 2. Bell went 0 for 5 Tuesday and is hitless in his last 23 at-bats.
''We're set up for success, we just have to go out there and get it done,'' Myers said.
Fortes' solo shot in the second gave Miami an early lead. Fortes drove a sinker from Sean Manaea over the wall in left for his fifth homer.
''It doesn't necessarily have to be a hit, just a good at-bat or a good swing, solid contact,'' Fortes said. ''For it to be a home run, it really sets the tone for the rest of the game.''
The Marlins increased their advantage on Jesus Aguilar's RBI double in the third.
Fortes went deep again in the fourth when his second solo blast landed in the left-field seats.
Miami starter Edward Cabrera threw four scoreless innings, but was lifted after 91 pitches. The rookie right-hander allowed three hits, walked two, struck out seven and hit a batter.
''We made him throw pitches and got him out of there, got to the bullpen and tied the game,'' Padres manager Bob Melvin said. ''Just didn't do quite enough after that.''
Manaea's outing also lasted four innings. The left-hander gave up three runs, four hits, walked one and struck out six.
ANDERSON'S DEFENSIVE CONTRIBUTION
Although he went hitless and had three strikeouts in four at-bats, Marlins right-fielder Brian Anderson helped shut down a run-scoring opportunity for San Diego in the eighth. Myers hit a leadoff double and attempted to advance on Trent Grisham's flyout, but Anderson threw him out at third.
''To get that throw, that was pretty cool,'' Mattingly said. ''You kind of really see what he does out there in right-field.''
The Padres reinstated INF-OF Matt Beaty from the injured list and optioned him to Triple-A El Paso.
The Marlins reinstated RHP Cole Sulser from the injured list and designated RHP Parker Bugg for assignment. They also outrighted RHP A.J. Ladwig to Double-A Pensacola after he cleared waivers.
Padres: transferred RHP Craig Stammen (right shoulder inflammation) to the 60-day injured list. ... RHP Drew Pomeranz (right flexor tendon surgery) will have a rehab outing with El Paso at an unspecified date.
Marlins: LHP Trevor Rogers (low back spasms) is scheduled for his next rehab outing with Triple-A Jacksonville at an undetermined date. ... Sixto Sanchez (right shoulder inflammation) will throw in a simulated game Wednesday.
Social media personality and professional boxer Jake Paul threw out the ceremonial first pitch.
RHP Mike Clevinger (4-4, 3.47) will start the series finale for the Padres against Marlins RHP Pablo Lopez (7-7, 3.55) on Wednesday.
More AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.