BALTIMORE -- The Baltimore Orioles evidently figure if they're going to work overtime, they might as well make the most of it.
Nolan Reimold and Steve Pearce also homered for the Orioles, who have won 17 straight in extra innings, including 16 last season. It's the longest such streak since the Pittsburgh Pirates won 21 in a row from June 1959 to July 1960.
"It's huge for us to get the feel for it, how we did it last year," third baseman Manny Machado said.
Nick Markakis led off the 10th with a single against Jamey Wright (0-1). Brandon Gomes came in to face Machado, who reached on a bunt single that hugged the first base line. Adam Jones followed with a long single to the warning track that eluded right fielder Ben Zobrist, but Markakis held up initially and could only make it to third.
"I felt like it was going to go," Wieters said. "I knew it was going to get a run in, whether it went out or not. I knew the game was going to be over. That was a good feeling."
Asked if he'd ever finished a game with a grand slam, Wieters replied, "I don't think a grand slam. Anytime you get a walk-off and get to celebrate with your teammates, it's a good day."
Troy Patton (1-0) worked the 10th for the Orioles, who took two of three from their AL East rivals.
"Offense was fantastic," Tampa Bay manager Joe Maddon said. "We did a lot of good things, but Baltimore outplayed us in this series."
Tampa Bay starter David Price, the reigning AL Cy Young Award winner, walked off the mound with the lead but remained winless in four starts this season.
The Rays were ahead 5-4 when Price gave up a leadoff double to J.J. Hardy in the seventh inning. Jake McGee then served up a 3-2 pitch that Pearce drove over the left-field wall -- his first hit in 16 at-bats this season.
Price gave up five runs and eight hits, striking out six. The left-hander is 0-1 with an uncharacteristic 6.26 ERA.
"It's a frustrating time for myself and this team right now," Price said. "I play this game to win, and most importantly, I want our team to win every fifth day when it's my time to pitch. I'm not helping the team right now so I'll have to make some adjustments and find what works."
Maddon, who used 13 different lineups in the Rays' first 14 games, stayed with the same batting order he used Wednesday night against Orioles starter Chris Tillman.
"I liked our approach against Tillman, so why not run the same group back out there against a very similar pitcher?" Maddon said before the game, referring to Orioles starter Miguel Gonzalez.
The Rays scored six runs on 11 hits Wednesday, and they put up those same exact numbers on Thursday -- but lost.
Jennings got the Rays started with his second leadoff homer of the series, a drive to left on a 1-2 pitch. Two outs later, Longoria hit his third home run in four games.
A sacrifice fly by Jennings made it 3-0 in the second before Zobrist fouled out with three runners on, leaving the Rays 0 for 12 this season with the bases loaded.
In the bottom half, Chris Davis singled in a run and Reimold homered to tie the score.
A throwing error by Hardy provided the Rays an unearned run and a 4-3 lead in the third.
After Baltimore put runners on the corners with two outs in the fifth, Machado hit an RBI double off the left-field wall. But Markakis overran third base and was tagged out to end the inning with the score tied at 4.
The Orioles open a three-game interleague series Friday against the Los Angeles Dodgers, who make their first visit to Camden Yards since 2002. Baltimore manager Buck Showalter is looking forward to being reunited with Dodgers skipper Don Mattingly, who played for Showalter on the Yankees in the 1990s. "It's not surprising he's managing, and he's a good one," Showalter said. ... After going 2-7 on a trip through Texas, Boston and Baltimore, the Rays begin a six-game homestand Friday night against the Oakland Athletics. "Yeah, we're ready to get back. It will be nice to get home and get things back in order," Maddon said. ... Orioles RHP Steve Johnson (strained back muscle) threw four innings in an extended spring training game and will next be sent on a rehabilitation assignment at an affiliate yet to be determined. ... Baltimore did not allow a first-inning run until Tampa Bay came to town and scored four runs on four homers over three games.