BALTIMORE -- J.J. Hardy homered twice, doubled and drove in five runs, and the Baltimore Orioles defeated the Tampa Bay Rays 9-2 Tuesday night and moved into a tie for the AL East lead.
Hardy went 4 for 5 to help Baltimore pull even atop the division with the New York Yankees, who lost 4-3 at Boston. The Rays are two games behind the co-leaders.
Chris Davis homered and Matt Wieters had three hits and two RBIs for Baltimore.
Hardy hit a two-run homer in the third inning, doubled and scored in the fifth, singled in a run in the sixth and added his 21st homer with a runner on in the eighth. It was his ninth career two-homer game, the second this season.
Baltimore starter Jason Hammel left in the fourth inning with an injured right knee. The right-hander underwent arthroscopic surgery on that same knee in mid-July and was making his second start since returning from the disabled list.
Hammel had no problem with the knee on Thursday night against the Yankees, and retired 11 of 13 Tampa Bay batters before exiting.
Steve Johnson (3-0) got the win with 1 1-3 innings of hitless relief.
Ryan Roberts and Elliott Johnson hit solo homers for Tampa Bay. It was the first time since Aug. 4 that the Rays lost by more than two runs; eight of their previous 12 defeats were by one run.
Roberts left in the sixth inning with a left forearm strain, the result of a tag he made at second base.
Tampa Bay left-hander Matt Moore (10-10) threw 94 pitches over four innings before being lifted by manager Joe Maddon. Moore allowed two earned runs on four hits and three walks.
Burke Badenhop entered with a run of eight straight scoreless appearances and promptly gave up a double to Hardy, a single to Adam Jones and two-run double to Wieters that provided Baltimore with a 5-1 lead.
Hardy's sixth-inning RBI single came off Cesar Ramos and Davis hit his 25th homer in the seventh off J.P. Howell.
Johnson connected off Darren O'Day leading off the eighth, and Hardy homered off Dane De La Rose in the bottom half.
The victory improved Baltimore's record against AL East foes to 33-24 compared to 28-44 last year.
Baltimore broke on top with an unearned run in the first inning. Jones walked and scored when Matt Joyce fumbled Wieters' two-out single to right.
Hammel retired the first eight batters before Roberts connected in the third. It was his fourth homer with Tampa Bay since in coming over in a trade with Arizona on July 24.
In the bottom half, Robert Andino led off with a double and Hardy homered to put the Orioles ahead for good.
NOTES: Baltimore leads the season series 7-6 and took the lead in the all-time series, 127-126. ... The Orioles purchased the contracts of OFs Endy Chavez and L.J. Hoes and designated RHP Kevin Gregg and INF Ryan Adams for assignment. ... This was the first of 15 consecutive games against AL East foes for the Rays, who head to Yankee Stadium after this three-game series. ... The Rays will send Alex Cobb to the mound Wednesday night and the Orioles will start rookie Miguel Gonzalez, who's 0-1 with a 6.52 ERA in two starts against Tampa Bay.