ST. PETERSBURG, Fla. — Jake Odorizzi just didn’t have it Tuesday night. There haven’t been too many of those lately.

Manny Machado capped a six-run fourth inning with a grand slam off Odorizzi, leading the Baltimore Orioles over the Tampa Bay Rays 11-2.

“Just overall control was bad really past the first inning,” said Odorizzi, who lost for the first time in 10 starts since the All-Star break. “Even my fastball was kind of spotty just with location. I really didn’t have any confidence with my changeup tonight.”

Chris Davis and Adam Jones also homered for the Orioles, who entered the day tied for the second wild card and two games behind AL East-leading Toronto.

“We faced one of the better pitchers in the American League today,” said Baltimore manager Buck Showalter. “He had like eight pitches in the first inning and we had a lot of good at-bats after that first inning. We kind of wore him down a little bit.”

Machado’s homer was his 34th this season, while Davis got his 35th and Jones got his 26th.

Odorizzi (9-6) gave up seven runs, six hits and three walks over four innings, tying his shortest start of the season. Machado’s grand slam, the first ever given up by Odorizzi, was set up by two walks, a hit batter and J.J. Hardy’s two-run double.

“I think you could tell fairly early on that Odo’ didn’t quite have all of his weapons tonight,” said Rays manager Kevin Cash. “We’ve seen him so good here as of late. Tonight he just didn’t have the best feel for the changeup. He really committed to the fastball more than anything.”

Yovani Gallardo (5-7) pitched five innings for Baltimore, giving up two runs (one earned) and five hits while striking out five.

Jones’ eighth-inning homer was the Orioles’ major league-leading 218th of the season, moving them ahead of last year’s team for second-most ever among Baltimore teams. The 1996 Orioles set the club record with 257 homers.

Logan Forsythe led off the Rays’ first with his 18th home run, and Kevin Kiermaier extended his hitting streak to 10 games with a single.

The Rays’ third straight loss dropped them to 3-11 against the Orioles this season.

TRAINER’S ROOM

Rays: 3B Evan Longoria, hit on the right hand by a pitched ball Monday, started. “It’s sore,” Longoria said. “It’s OK.”

SHORTSTOP SURGERY

Rays SS Matt Duffy will see a doctor Friday to finalize surgery addressing heel issues stemming from a strained left Achilles’ tendon that cost him two months this season.

“At this point his focus is on making sure he’s healthy for 2017,” Rays president of baseball operations Matt Silverman said.

SS Tim Beckham, taken first overall in the 2008 draft, has not been recalled after being sent to Triple-A Durham last week after a couple baserunning gaffes.

NEW VISION

Longoria was surprised at the timing of hitting coach Derek Shelton’s firing on Tuesday.

“As much as I don’t like to see Shelty go, I’m on board with them making a change and wanting to go in a different direction,” Longoria said.

Rays minor league hitting coordinator Chad Mottola replaced Shelton.

“It gives Chad a few extra weeks to get to know our hitters better,” Silverman said.

UP NEXT

Orioles: RHP Dylan Bundy will start Wednesday’s series finale. He is 5-3 in eight starts since giving up three home runs in a 5-2 loss at Tropicana Filed on July 17.

Rays: LHP Drew Smyly is 4-1 lifetime against the Orioles, but gave up eight runs, including a first-inning grand slam, to Davis in a 12-5 loss at Baltimore on June 26.