CC Sabathia shouted salty insults at the Tampa Bay Rays and said he tried to hit one of their batters.

A little while later, it was Gio Urshela who had the last word for the New York Yankees.

Urshela's single capped a three-run rally in the bottom of the ninth inning, and the Yankees leapfrogged Tampa Bay into first place in the AL East with a rousing 4-3 victory Friday night.

"When Gio came up, I said: 'Turn off the lights,' " Sabathia recalled.

Urshela, subbing sent a two-out drive over Kevin Kiermaier's head in deep right-center field for his first walk-off hit.

"Night in and night out, I mean, it gets better and better. It's crazy," Luke Voit said.

Tampa Bay had been alone in first place since the end of games on March 31.

After striking out Lowe with his final pitch in the sixth, Sabathia cursed and yelled a nasty phrase in the Rays' direction. "I don't remember what I said," Sabathia answered. "Just excited about the game. We are playing for first place."

The teams play twice more this weekend. New York took two of three from the Rays last weekend at Tropicana Field.

"Any time you get walked off, it's tough," Rays manager Kevin Cash said. "We did a lot of things good. We just came up short."

Voit homered on the first pitch from Jose Alvarado to make it 3-2. New York tied it when pinch-runner Thairo Estrada scored on a bases-loaded wild pitch by Alvarado, who entered with a 1.04 ERA.

Oakland 7, Detroit 2: The visiting Athletics beat the Tigers for the 14th consecutive time, with winning pitcher Frankie Montas striking out 10 in 8⅔ innings.

Los Angeles 5, Kansas City 2: Tommy La Stella's single was the only run-scoring hit in a three-run Angels third in Anaheim, Calif.

Baltimore 5, Cleveland 1: Dylan Bundy kept Cleveland's lineup in check — and in the ballpark — for 5⅔ innings and Jonathan Villar hit a three-run homer, helping the visiting Orioles end a three-game slide.

Houston 3, Boston 1: George Springer hit his league-leading 17th home run, a two-run shot off Rick Porcello that helped the visiting Astros run their winning streak to nine.

Toronto 10, Chicago 2: Vladimir Guerrero Jr. hit one of three home runs for the visiting Blue Jays, who tied their highest run total of the season.

National League

Los Angeles 6, Cincinnati 0: Cody Bellinger hit the last of Los Angeles' four homers, Rich Hill stuck out a season-high 10 and the Dodgers won their fourth in a row, in Cincinnati.

Miami 8, New York 6: The Marlins scored for the first time in 27 innings, pounded Jacob deGrom for seven runs and ended a seven-game losing streak. Garrett Cooper's two-run single in the third brought home Miami's first runs.

Pittsburgh 5, San Diego 3: Bryan Reynolds hit a go-ahead two-run homer, and the visiting Pirates held off a late-inning Padres rally.

Philadelphia 5, Colorado 4: Andrew McCutchen hit a two-run homer and Bryce Harper lined a two-run double, helping Cole Irvin win his second career start.

Atlanta 12, Milwaukee 8: Max Fried allowed two hits in six scoreless innings, Dansby Swanson hit a drought-breaking, three-run homer and the host Braves won the matchup of second-place teams. Swanson, Josh Donaldson and Tyler Flowers hit home runs in a nine-run sixth inning.

Chicago 14, Washington 6: Kris Bryant hit three home runs — in the seventh, eighth and ninth — with five RBI for the visiting Cubs. Wilson Contreras' homer off Matt Grace capped an 11-run barrage against the Nationals' bullpen.

Arizona 7, San Francisco 0: Eduardo Escobar's bases-loaded triple keyed a four-run seventh in Phoenix.

Interleague

Texas 7, St. Louis 3: Rougned Odor and Shin-Soo Choo homered in a seven-run second inning, sparking the host Rangers' seventh straight regular-season win over the Cardinals.