ST. PETERSBURG, Fla. (AP) — Jordan Montgomery stopped an eight-start winless streak, Aaron Judge singled in his return from COVID-19 and the New York Yankees beat the Tampa Bay Rays 4-3 on Tuesday night.

Montgomery (4-5) gave up five hits in five scoreless innings. The left-hander was 0-4 over his previous eight outings since beating Tampa Bay on June 2, despite allowing three or fewer runs seven times.

New York had lost three of four to AL East-leading Boston last weekend.

“We really needed it,” Yankees manager Aaron Boone said. “Every day is super important. We won tonight, we've got to get it tomorrow, and these guys are hyper aware of that and locked in on that.”

Aroldis Chapman, the fourth Yankees reliever, worked the ninth to get his 19th save in 23 chances. He walked Wander Franco with two outs and fell behind 3-0 on Nelson Cruz before striking out the veteran slugger.

“Anytime, obviously, Cruz is coming up there it can get a little tense,” Boone said. “But really like the way Chappy is throwing the ball. Ultimately made pitches when he had to.”

Judge, placed on the COVID-19 injured list July 16 after testing positive, had a base hit in the first inning. He went 1 for 4 and was hit by a pitch.

Gio Urshela drove in two runs for the Yankees, who are nine games behind Boston and seven back of the second-place Rays. New York was coming off a 5-4 loss Sunday at Boston in which the Red Sox scored five times in the eighth after being no-hit through seven innings by Domingo Germán.

“They haven't lost faith, they haven't lost confidence,” Boone said. “They have gotten themselves off the mat. They do a really good job of turning the page every day and that's what we'll continue to do.”

Randy Arozarena cut the Rays' deficit to 4-3 in the eighth with an RBI double off Zack Britton, who prevented further damage by inducing an inning-ending double play from Mike Zunino with two on.

Tampa Bay got a two-run homer from Brandon Lowe. The Rays are 7-4 since the All-Star break.

“There were certainly some good things, we just came up short it felt like the whole day,” Tampa Bay manager Kevin Cash said. “Just a little behind.”

Urshela, reinstated from the COVID-19 injured list Sunday after missing eight games, made it 3-0 with a two-run double in the sixth off Shane McClanahan (4-4).

Ryan LaMarre put the Yankees ahead 4-2 on a solo homer in the eighth.

Lowe got the Rays to 3-2 on an opposite-field homer to left off reliever Chad Green in the sixth. It was Lowe’s career-high 22nd and snapped a 10-game homer drought.

After wasting several scoring threats, the Yankees went up 1-0 in the fifth when Greg Allen doubled and scored on a single by DJ LeMahieu.

The first inning ended when Gleyber Torres hit into New York's 95th double play of the season, this one with the bases loaded. After Urshela hit a one-out double and reached third on a wild pitch in the second, McClanahan struck out LaMarre and Allen.

McClanahan allowed three runs and nine hits over six innings.

LATE-NIGHT DEAL

About two hours after the game, the Yankees announced they had traded relievers Luis Cessa and Justin Wilson to the Cincinnati Reds for a player to be named.

Cessa went 3-1 with a 2.82 ERA in 29 appearances for New York this year. In six seasons with the Yankees, the 29-year-old right-hander was 10-13 with four saves and a 4.19 ERA in 131 games, including 19 starts.

Wilson was 1-1 with a 7.50 ERA in 21 relief outings. The 33-year-old lefty missed a combined 34 games during two stints on the injured list with left shoulder inflammation and a right hamstring strain.

In 10 big league seasons with five teams, Wilson is 33-23 with 18 saves and a 3.44 ERA in 501 relief appearances.

QUOTABLE

“We understand we’re in a point of the season where we’re a little behind the 8-ball. We’ve dug ourselves a little bit of a hole and it’s all about winning.” — Boone.

BAD NUMBERS

Judge (fifth) and Urshela (eighth) grounded into double plays, giving New York 97 on the year. Torres' double-play grounder was the 14th with the bases loaded.

TRAINER’S ROOM

Yankees: 1B Luke Voit (left knee inflammation) is expected back in the next couple of days. … Backup catcher Kyle Higashioka also was reinstated from the COVID-19 injured list.

Rays: OF Manuel Margot (strained left hamstring) returned from the 10-day IL. … Relief pitcher Nick Anderson (right elbow strain) will join Triple-A Durham on Thursday for his third rehab appearance. … RHP Chris Archer (right forearm strain) allowed one hit over 3 2/3 scoreless innings for Durham against Norfolk.

OUCH!

Britton bounced a pitch that hit plate umpire Andy Fletcher in the mask in the eighth. Fletcher appeared to be cut around the mouth but stayed in the game.

UP NEXT

Yankees LHP Nestor Cortes (0-0) and Tampa Bay RHP Michael Wacha (2-2) are Wednesday night’s starters.

___

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports