The Tampa Bay Rays finally fell in San Diego, though they didn't dwell too much on their loss.

It's hard to be down when the rest of their road trip was perfect.

"If you go 5-1 on the road you have to be happy with that," the Rays' Tommy Pham said. "Now we have to take that same effort home and play some great baseball."

Cal Quantrill contributed with his arm and bat as the Padres beat Tampa Bay for the first time in over nine years, topping the Rays 7-2 on Wednesday.

San Diego had lost nine in a row to the Rays overall since June 23, 2010, in an interleague matchup that hasn't occurred too often.

The Padres also posted their first home win over Tampa Bay — they were 0-3 against the Rays in 2004 when Petco Park opened, and had dropped the first two games of this series.

"These are two teams that don't see much of each other, so overall I'm really pleased with the way we played," Rays manager Kevin Cash said. "Going 5-1 on the road is the kind of ball we expect to play."

Eric Hosmer homered to help San Diego stop a three-game losing streak. Tampa Bay had won five in row, along with nine straight on the road.

"We still believe this team has a chance at the postseason," Hosmer said of the Padres, who have upcoming series against Philadelphia and Cincinnati. "Now we're going up against teams where it matters and that kind of gets us all fired up."

Quantrill (6-3) gave up a two-run homer to Pham in the first inning, but little else before leaving with one out in the sixth. He allowed three hits and walked one, striking out six.

Padres manager Andy Green praised the way his starter bounced back from the poor beginning of the game.

"The whole thing about was just incredibly impressive," Green said. "A lot of young pitchers would have just lost it at that point. But he didn't yield. He was just a bulldog on the mound and kept fighting."

Quantrill is 4-1 with a 1.32 ERA since the All-Star break. The rookie also had his first major league hit and RBI with a single to right in the second inning.

"I was just OK today," Quantrill said. "Those first 12 pitches of the game certainly were not the way I wanted to start, but I managed to keep the ball in the strike zone and fight through it. That team makes you throw strikes and I was able to battle with them and get the job done."

Rays starter Jalen Beeks (5-2) allowed five runs on eight hits in five innings.

The Padres scored twice on four hits in the fourth to break a 2-2 tie. Luis Urias, who has six RBIs in the last two games, doubled and Hosmer hit his 18th homer in the fifth.

TRAINER'S ROOM

Rays: OF Avisail Garcia (right oblique strain) was placed on the 10-day injured list. The Padres recalled RHP Jose De Leon from Triple-A Durham. DeLeon pitched two innings Wednesday, allowing one run.

Padres: SS Fernando Tatis Jr. did not play after leaving Tuesday's game with lower back spasms. The Padres hope he can play Friday in the series opener at Philadelphia.

UP NEXT

Rays: After an off day Thursday, RHP Charlie Morton (13-4, 2.90 ERA) is expected to start as the Rays begin a six-game homestand Friday against Detroit. Morton has the third-best ERA among AL starting pitchers, but he has allowed four or more in three of his last five starts.

Padres: After an off day Thursday, RHP Chris Paddack (7-5, 3.26 ERA) is expected to start for the Padres when they begin a six-game road trip Friday in Philadelphia. Paddock had no-decisions in his previous two starts while allowing nine earned runs in 10 innings.