Jose Reyes, who extended his hitting streak to a season-high 16 games, led off the 10th with a double. Following an intentional walk to Carlos Lee, Ruggiano delivered his second big hit of the day. He also drove in Reyes with a game-tying single in the sixth.
"It's about time that I show up," Reyes said. "I'm just feeling good right now. I'm being aggressive on the field. That's what made me the player that I am."
Before the Marlins could come away victorious in the bottom of the 10th, they had to survive a potential rally in the top of the inning. Padres outfielder Chris Denorfia beat out an infield single to load the bases, but reliever Ryan Webb induced an inning-ending flyout from Chase Headley.
"It's exciting, especially the way we've been playing the last five months, it's nice to see the guys not go with the long face back to the clubhouse," Marlins manager Ozzie Guillen said. "They were excited, happy about it. I feel great for them. They fight back. It's a great feeling when the team fights that much and has this kind of win."
The Marlins battled back earlier in the game when third baseman Donnie Murphy capped a four-run rally in the sixth with his two-run triple to right field. The triple, which gave Miami a two-run lead, was Murphy's first big league hit since June 1.
"It's always huge, no matter if you've been here the whole season or just got back. It's always nice to get in there and get a big hit for the team," Murphy said. "We were struggling early, so to get something to work with there and give us the lead at the time was awesome."
But the Marlins' lead would not stand for long. Trailing, 4-2, in the eighth, the Padres watched first baseman Yonder Alonso crush a 410-foot, two-run homer to right field off Edward Mujica to tie the game at 4. In five outings since returning from the disabled list on July 18, Mujica had not allowed a batter to reach base.
"We got one [big hit] with Yonder, but they had a couple big hits in the sixth to tie the game and eventually take the lead," Padres manager Bud Black said. "We got the big hit in the eighth to tie it. In these types of games, it comes down to whoever gets the big hit in the end, and they got it."
Marlins starter Josh Johnson held the Padres to just two runs on two hits, but the right-hander struggled with his command as he labored through five innings.
"[Ninety-five] pitches in five innings, that's a lot," Guillen said. "He did not pitch well, but they only scored two runs. I think I'm going to give credit today to the bullpen. They did a tremendous job."
Johnson, who had issued just one walk over his three previous starts, tied a career high by walking six Padres. He had not walked six in a game since June 18, 2008, against the Blue Jays.
"It was a mess that I found a way to clean up," Johnson said. "I don't know how, but I made pitches when I needed to. I was all over the place. I just walked them. You can't do that. You can't walk six guys."
Padres starter Clayton Richard was solid for the first five innings, but recorded just one out in the sixth before being lifted for Dale Thayer. Richard held the Marlins to a pair of runs on five hits over 5 1/3 innings.
With Sunday's victory, the Marlins won their first series since they swept the Phillies from June 29-July 1, but Guillen said it felt like longer. The Marlins had lost their previous three series before taking two of three from the Padres this weekend
"Believe me, a little longer because we've been losing series different ways -- defense, hitting, bad pitching, bad managing. You know me, everything," Guillen said. "We find a way to lose games, and to win this game is really nice, and the series. Hopefully we continue to do that and hopefully we stay positive. We're going to fight. No matter what ballclub we're going to have, we're going to go out there and try to have some fun."