ST. PETERSBURG, Fla. — The Baltimore Orioles are looking down at the rest of the AL East — and the All-Star break is in the rearview mirror.

Fun times for Colton Cowser & Co.

Cowser hit a sacrifice fly in the 10th inning, and the Orioles beat the Tampa Bay Rays 4-3 on Thursday night in the opener of a four-game series between the American League’s top teams.

“I think tonight was a great team win,” Cowser said after his 11th major league game.

Baltimore started the day in first place for the first time after the All-Star break since Aug. 15, 2016. The Orioles, who were 6½ games back at the beginning of July, now have a one-game lead.

“It’s just July, that’s kind of where I’m at right now,” Orioles manager Brandon Hyde said. “This team [the Rays] is so good and so hard to play, especially here. We’ve been on the other side of those type of games I can’t tell you how many times.”

Aaron Hicks opened the 10th at second as the automatic runner. He advanced on pinch hitter Adam Frazier‘s sacrifice bunt and scampered home on Cowser’s fly to left against Robert Stephenson (1-4).

Felix Bautista (5-1) worked a perfect ninth for Baltimore and then stayed on for the 10th. He hit Luke Raley and struck out Randy Arozarena before Brandon Lowe bounced into a game-ending double play.

“How about Felix Bautista?” Hyde said. “I’m so lucky to have him. The reason why he pitched the 10th is because he had such an efficient ninth. … He’s amazing.”

Orioles second baseman Ramon Urias helped keep the score tied in the eighth when he made a diving stop on pinch hitter Harold Ramirez‘s grounder with two on and threw him out at first.

Tampa Bay has lost five in a row. It is tied with Pittsburgh for the majors’ worst July record at 3-12.

The announced crowd, which included a sizable turnout of Orioles fans, was 20,203. Tampa Bay entered the game averaging 17,849 at home.

The Rays trailed 3-1 before rallying in the seventh. Taylor Walls singled and Christian Bethancourt reached on a bunt, ending Kyle Gibson‘s night. Yandy Diaz then greeted Yennier Cano with a two-run double.

Baltimore had been in front since it scored three times in the fourth. Gunnar Henderson sparked the rally with some smart baserunning, racing into third for a leadoff triple when Arozarena lobbed a throw toward the infield after fielding the hit down the left-field line.

Adley Rutschman singled on Tyler Glasnow‘s next pitch and later scored on Ryan O’Hearn‘s sacrifice fly.

“It was tough to see,” Arozarena said through a translator. “I think it was more my fault throwing the ball really soft.”

Baltimore took a 3-1 lead when Anthony Santander knocked the ball loose during a tag attempt by catcher Francisco Mejia after Aaron Hicks‘ single. Mejia was charged with an error.

“Ugly, yeah,” Rays manager Kevin Cash said of the inning.

Tampa Bay had a runner in scoring position in each of the first five innings but scored just once on Mejia’s second-inning RBI single.

Glasnow struck out nine in seven innings. Gibson struck out eight in six-plus innings.

“That was a big win not because of the standings or anything,” Gibson said. “It was big [because] it was the first game of the series and it set the tone.”