BOSTON (AP) — The Boston Red Sox had just enough energy left to celebrate Jonny Gomes' big swing.

Gomes hit a two-run homer in the ninth inning to lift the Red Sox to a 3-1 win over the Tampa Bay Rays on Tuesday night, completing a doubleheader sweep.

Daniel Nava was aboard on a leadoff walk when Gomes followed with a towering shot off Joel Peralta (1-3) that cleared the Green Monster and bounced off the sign just to the right of the foul pole.

Gomes' fifth homer rescued Andrew Bailey (3-0), who yielded a tying homer to Kelly Johnson in the top half of the inning. It also came at the end of a very long day, which started at 1 p.m. with Boston's 5-1 win in the opener, which was delayed almost three hours by rain.

"Long day at the yard. Two wins kind sums it all up," said Gomes, who connected on the first pitch he saw from Joel Peralta (1-3).

The Red Sox poured out of the dugout to congratulate Gomes when he reached home plate. They had lost four of six coming into the day.

Nava also homered in the second and Felix Doubront pitched eight shutout innings for Boston in the night game. Doubront struck out six and held the Rays to three singles.

Doubront retired his last 17 batters, but Boston manager John Farrell decided to go to Bailey for the ninth. It was the longest outing of Doubront's career.

Johnson greeted Bailey with a drive to right on a 1-0 pitch. Ben Zobrist walked with two outs, but Evan Longoria grounded into a fielder's choice to end the inning.

"We've got a really good team here and the sign of a good team is guys picking each other up," said Bailey, who got his eighth save Sunday despite allowing two runs at Baltimore in the ninth. "Nava's at-bat and Jonny's swing obviously got us the win and ultimately that's what matters. I've got to figure out what I'm going thru but these guys are grinding every day and we'll get through it."

The ending was decidedly different from the first game, when Boston led 4-1 in the bottom of the fifth when a downpour arrived and put everything on hold for two hours, 59 minutes. The Red Sox added one more run before the game came to an end more than six hours after it began.

The two teams got a break of about 45 minutes before Game 2 started.

"Long day, but no excuses. It's long for both sides," Tampa Bay manager Joe Maddon said. "Two really closely contested games. They've beaten us this year in close games and that's why we're in the position we're in and that's why they're in the position that they're in, very simply."

Highly touted prospect Wil Myers made his major league debut for the Rays. He went hitless in the opener, then singled to left in his first at-bat of the second game for his first hit.

"It was awesome. It was a very cool experience. Everybody congratulated me on it," said Myers, who started both games in right field. "It was long, obviously, but it was awesome. It was everything I expected it to be. It was just a very exciting experience for me."

David Ortiz drove in three runs in the opener, and Alfredo Aceves (4-1) pitched five solid innings for his third straight win. Aceves overcame early control problems, allowing one run and three hits.

The first game was marked by the lengthy delay, prolonging a game that had already been postponed April 12 because of rain.

"If you really put the hours into it, from the time it was first scheduled until the last out today, that's a pretty long game," Maddon said.

Long enough that Maddon grabbed a nap in his office after the downpour began and the field was cleared at 2:58 p.m. EDT.

The Red Sox invited fans who stuck out Tuesday's first game to return for the second for free. The opener ended after the scheduled 7:05 p.m. start time for the nightcap — by that point, with little turnaround time, Game 2 were already wandering into Fenway Park.

Tampa Bay starter Chris Archer (1-3) was charged with four runs, three earned, and five hits over 4 2-3 innings in the opener.

NOTES: Boston placed pitcher Clay Buchholz on the 15-day disabled list because of a strained neck after the first game. Buchholz is 9-0 and leads the majors with a 1.71 ERA. … It was the third doubleheader of the season for the Red Sox, who had been swept by Kansas City in April and split a pair with the Los Angeles Angels on June 8. … At 22 years, 190 days old, Myers became the youngest player to make his MLB debut in right field at Fenway Park since Boston's Dwight Evans did so at 20 years, 318 days on Sept. 16, 1972.

Join our Newsletter for the latest news right to your inbox