ST. PETERSBURG, Fla. -- Another one-run victory by the Baltimore Orioles pushed the AL East race to the final day of the season.
Baltimore remained one game behind the first-place New York Yankees, who rallied late to beat Boston 4-3 in 12 innings. The Orioles, already assured a playoff spot, need a victory Wednesday and a Yankees loss to force a one-game tiebreaker for the division title Thursday at Camden Yards.
"We're not supposed to be here. So just go out and have fun and see what happens," closer Jim Johnson said after the Orioles improved to 29-9 in one-run games.
"You have to win those games," he added. "If you're able to keep it close, you just try to find a way."
Orioles rookie Miguel Gonzalez (9-4) limited the Rays to two singles over 6 1/3 innings. The right-hander walked two and struck out seven before manager Buck Showalter turned the game over to the bullpen.
Davis joined Hall of Famer Reggie Jackson as the only Baltimore players to homer in six consecutive games, connecting off Shields (15-10) in the fourth. The Orioles managed only one other hit -- Nate McLouth's sixth-inning single -- in Shields' 19th career complete game and third this season.
"He made one mistake, and fortunately Chris was on it," Baltimore manager Buck Showalter said.
The Rays have lost 1-0 five times since Aug. 5 -- twice to the Orioles.
"I hung a changeup. He's a pretty good hitter. I think that was probably the farthest home run I've ever given up in my career," Shields said. "I sent the bat boy over and told him to tell him, 'Can you hit it any farther?' Just joking around a little bit. He said something like, 'I'm sorry. I'll go and try and hit it 480 feet next time.' I thought that was pretty funny."
The Orioles, guaranteed at least a wild-card spot, clinched their first playoff berth in 15 years late Sunday.
The Rays won the opener of the three-game series Monday night to extend a late surge that kept them in contention for the second AL wild card, but they were eliminated from postseason contention when the Oakland Athletics beat Texas a few hours later to assure themselves at least a wild card.
Brian Matusz replaced Gonzalez after the starter struck out Jeff Keppinger to begin the seventh. Darren O'Day worked the eighth for the Orioles, and Johnson finished the two-hitter for his major league-leading 51st save.
Gonzalez pitched seven scoreless innings in his only previous start at Tropicana Field on Aug. 5, but was not involved in the decision in a game the Orioles won 1-0 in 10 innings. He limited the Rays to two hits and four walks in that outing and was even tougher on them this time.
Evan Longoria singled leading off the second against the right-hander. B.J. Upton drew a leadoff walk in the fourth and was stranded at second when Longoria flied out and Keppinger struck out. Chris Gimenez opened the sixth with Tampa Bay's second hit, and Gonzalez walked Ben Zobrist with two outs before fanning Longoria to end the threat.
Shields was just as impressive, retiring 11 in a row before giving up Davis' 33rd homer. The right-hander whiffed seven of the last nine batters he faced to finish with a flourish.
"I knew this was my last game and I wanted to let it all hang out. I wanted to end on a good note, end on a bang," Shields said. "That was probably the best game of my career."
Davis homered over the center-field wall on a 1-1 changeup with two outs in the fourth. Jackson homered in six straight games for the Orioles in July 1976.
"It kind of blows my mind to even be mentioned in the same breath as Reggie, but it's more about the win than anything else," Davis said. "I'm kind of glad to be the guy that's coming through in this situation, but as long as we get the win I don't care."
All-Star closer Fernando Rodney was selected as the Rays' team MVP in a vote of local baseball writers covering the team. If the right-hander doesn't give up an earned run in Wednesday night's season finale, he will set a major league record for the lowest ERA by a relief pitcher working a minimum of 50 innings. Rodney got his 47th save Monday, lowering his ERA to 0.6053 in 74 1/3 innings. Dennis Eckersley set the record of 0.6136 for Oakland in 1990. ... Rays pitchers have struck out 10 or more batters in a game 60 times this season. ... Orioles RHP Jason Hammel, who threw a bullpen session Monday, is no longer restricted by his knee injury and is an option for the Orioles in the postseason, Showalter said. ... RHP Kevin Gausman, Baltimore's first-round draft pick out of LSU, visited the team and said he hopes to pitch in the big leagues next year. "That's one of my goals, but it's not up to me," the 21-year-old said.
Alvarez: Astros showing we are the best team in the league
Yordan Alvarez discusses the Astros advancing to the World Series and how much they proved in beating the Red Sox.
St. Louis Cardinals plan to hire bench coach Oliver Marmol, 35, as next manager, sources say
The St. Louis Cardinals, looking for a new direction headed into next season, plan to hire Oliver Marmol, 35, as their next manager, sources told ESPN's Jeff Passan on Sunday night, after the club dismissed Mike Shildt earlier this month.
Sources: San Diego Padres locked in on hiring Indians' Ruben Niebla as pitching coach
The Padres are locked in on hiring Ruben Niebla to be their next pitching coach, sources told ESPN. Niebla has been with the Indians since 2001.
Houston Astros' Framber Valdez gets starting nod for World Series Game 1, will be opposed by Atlanta Braves' Charlie Morton
After tossing a gem at Fenway Park in the ALCS, Houston left-hander Framber Valdez will start Game 1 of the World Series for the Astros on Tuesday, opposed by Atlanta Braves right-hander Charlie Morton.
Braves vs Astros: A World Series 6 decades in the making
— Freddie Freeman swinging onto baseball’s biggest stage for the first time, Jose Altuve & Co. back for more. Luis Garcia, Framber Valdez and a fresh set of Houston arms facing Ozzie Albies, Austin Riley and these eager, young Atlanta bats.
Taylor: I don't thinking about hitting HRs, they happen by accident
Chris Taylor downplays the three home runs he hit in the Dodgers' 11-2 win over the Braves.