MIAMI -- When closer Joakim Soria's scoreless-inning streak ended, he quickly regrouped to keep the Kansas City Royals' winning streak going.
Soria allowed a run for the first time this season, then struck out the next two batters to end the game, and the Royals won their fifth in a row by beating the slumping Florida Marlins 7-6 Friday night.
Brett Tomko pitched six innings for his first victory in nearly six weeks, and two unearned runs provided the winning margin for Kansas City.
Soria had a three-run cushion when he gave up a two-run homer to Jeremy Hermida on an 0-2 curve with one out in the ninth. The right-hander then struck out Hanley Ramirez and Jorge Cantu -- both on curves -- for his 11th save.
"We got the win and I got the save," Soria said. "That's all that's important."
The Royals' win streak is their longest since last June.
"You're going to go through hot streaks and cold streaks, but right now we're playing great baseball," left fielder Jose Guillen said.
Guillen had three hits and drove in two runs, and Miguel Olivo drove in two runs with his fifth homer.
Soria retired the first batter in the ninth, then gave up only his second walk this year to Cody Ross. Hermida followed with his fifth homer to center.
"He crushed it," Soria said.
Soria's ERA soared to 1.04. He threw 16 2/3 scoreless innings to start the season, one-third of an inning shy of the Royals record.
"It wasn't going to last forever," Tomko said. "A guy got him, but he still got the job done."
Tomko (2-4) allowed five hits and two runs to win for the first time since April 6. He had lost his past four decisions.
"It's nice to get on the W side and get back on track," he said. "I felt like I was in control for the most part."
Andrew Miller (3-3) pitched five innings and allowed four runs, two earned, for the NL East-leading Marlins. They've lost four in a row for the first time this year.
Shortstop Ramirez committed the error that allowed two unearned runs to score, and he also went 0-for-5. His $70 million, six-year contract extension is expected to be formally announced Saturday.
"I tried to do too much," he said.
Florida's Dan Uggla hit his 13th home run and also doubled and scored. But two fielding gaffes in the fourth hurt the Marlins, who rank last in the majors in defense.
"We definitely gave it away," first baseman Wes Helms said. "There's no excuse for it on my part, on the team's part, and that's something you're embarrassed about. I'm embarrassed, everybody's embarrassed."
When Olivo hit a one-out dribbler in front of the plate, Miller had a routine play but threw wide of the bag to Helms. Because Helms wasn't standing on the base, Olivo was credited with an infield hit.
After Kansas City loaded the bases with two out, Tomko hit a one-hopper to Ramirez, whose errant throw to first allowed a run to score.
"At first I was going to go to second, but I changed my motion," Ramirez said.
Miller walked Joey Gathright to force in another run and give Kansas City a 4-1 lead.
The Royals scored twice in the first when Mark Grudzielanek walked, Alex Gordon doubled and Guillen hit a two-run single. Olivo homered for a 6-2 lead after Billy Butler doubled in the eighth.
Gordon singled home a run in the ninth.
Uggla homered in the third to make it 2-1. Matt Treanor hit a two-out RBI double for Florida in the fourth, and Helms doubled home two runs in the eighth.
Marlins 1B Mike Jacobs, who has been held out of the starting lineup since May 7 because of tightness in his right thigh, said he hopes to start Saturday. ... LF Josh Willingham (back strain) said he doesn't expect to return until late this month at the earliest. ... Marlins RHP Josh Johnson will throw a simulated game Monday for the first time since undergoing elbow surgery last August. RHP Anibal Sanchez will throw live batting practice early next week for the first time since undergoing surgery last June for a torn labrum. ... Tomko went 0-for-3 and is hitless in his past 37 at-bats.