Evan Longoria and Logan Morrison homered and drove in three runs apiece before a sellout crowd of 31,042 at Tropicana Field. Tanaka, who had baseball’s lowest ERA in spring training, was tagged for a career-worst seven earned runs in 2 2/3 innings.

A first-time All-Star in 2015 who lost an AL-leading 19 times last season, Archer (1-0) limited New York to two runs and seven hits. He narrowly escaped a bases-loaded jam in the seventh to turn a five-run lead over to a revamped bullpen.

Rays manager Kevin Cash said it was important to give his ace an opportunity to get through the seventh.

“I’m really happy he did, not only for my sake but the other guys on the staff, too,” Archer said. ” I want them to know when stuff gets hairy, you need to strap it on and go right after them. We don’t need to be bailed out, we need to get out of the inning.”

There were three games around in the majors on the first day, and the Rays got off to a quick start.

Leadoff man Corey Dickerson singled in the Tampa Bay first for the first hit of the season and later scored on Longoria’s sacrifice fly as part of a three-run inning. Longoria connected for a two-run drive in the second.

Tanaka (0-1) made his third consecutive opening day start for the Yankees, and had been 6-0 with a 2.82 ERA in eight career starts against Tampa Bay. He gave up eight hits and two walks.

Longoria connected for his fourth homer on opening day. Morrison, who didn’t drive in a run until May 17 last season, added a solo drive in the third.

“Obviously, you just have to accept it. I can’t take it back,” Tanaka said through a translator. “So, the main thing is, I really need to move forward from today. Make the necessary adjustments.”

UNCHARACTERISTIC

Tanaka, who tied Hideo Nomo for the most opening day starts by a Japanese-born pitcher, had a seven-game winning streak stopped. He went 7-0 with a 2.28 ERA over his final nine starts of last season. … Tanaka had won all three of his previous career starts at Tropicana Field, limiting the Rays to four earned runs in 20 innings for a 1.80 ERA. He led the AL with a 2.36 road ERA in 2016, trailing only the Mets’ Noah Syndergaard (2.29) for the major league lead.

It was the second-shortest start of Tanka’s career. He tied the Yankees shortest on opening day, joining Ron Guidry (1983) and Mel Stottlemyre (1973).

LEADING OFF

Dickerson, who hit 24 home runs last year, was 1 for 5 in his debut as Tampa Bay’s leadoff hitter against right-handed pitching. Cash is considering moving right-handed batting Steven Souza Jr. to the top of the order against left-handers, beginning Tuesday against CC Sabathia.

TRAINER’S ROOM

Yankees: SS Didi Gregorius (right shoulder strain) expects to start limited baseball activities the middle of this week. He is out until some time in May. … INF-OF Tyler Austin (broken left ankle) was placed on the 60-day disabled list.

Rays: Longoria, who sat out Tampa Bay’s final spring training game due to a stiff neck, made his club-record ninth consecutive start on opening day. … Seven players, including C Wilson Ramos, OF Colby Rasmus and SS Matt Duffy, begin the season on the disabled list.

UP NEXT

Yankees: LHP CC Sabathia, 3-7 in 14 starts at Tropicana Field since joining New York in 2009, is Tuesday night’s scheduled starter. He’s 2-0 against the Rays in three road starts over the last two seasons.

Rays: RHP Jake Odorizzi is set to work the second game of the series, which resumes after a day off. He went 7-1 with a 2.71 ERA in 14 outings after the All-Star break last year. He was the only Tampa Bay starter with a winning record, at 10-6, in 2016.