Updated

BALTIMORE (AP) -- Manny Machado hit a three-run homer, Kevin Gausman pitched seven innings of two-hit ball and the Baltimore Orioles beat the Tampa Bay Rays 7-1 Sunday to avert a three-game sweep.

Mark Trumbo also homered and Seth Smith had two RBIs for the Orioles, playing their final home game until July 14.

Gausman (5-7) struck out nine and walked two in the finest of his 18 starts this season. The right-hander allowed only one runner past first base in lowering his ERA from 6.07 to 5.61.

It was Gausman's second straight scoreless outing; he blanked Toronto over 5 1/3 innings on Tuesday.

Jesus Sucre ended Baltimore's shutout bid with an eighth-inning homer off Mychal Givens.

Rays manager Kevin Cash watched from the dugout uncomfortably, and not only because Tampa Bay played poorly. Cash fractured his left ankle Sunday morning, stumbling on a railroad track while running through the streets of Baltimore.

Cash took a seat on the bench rather than man his usual post near the railing, and he sent pitching coach Jim Hickey out to make a pitching change. Cash insisted, however, that the mishap would not hamper his ability to run the team.

Tampa Bay starter Alex Cobb (6-6) gave up seven runs and six hits over 6 1/3 innings. He was 4-1 with a 2.00 ERA in nine previous appearances against the Orioles.

Baltimore went up 3-0 in the third. After a single, a hit batter and a sacrifice bunt, Cobb fielded a comebacker. He checked the runner at third, then turned and threw wildly to first.

Visibly angry at himself for allowing a run to score, Cobb worsened the situation by serving up an 0-1 pitch to Machado that ended up in the left-field seats.

Trumbo led off the fourth with his 12th home run, and Smith chased Cobb with a two-run double in the seventh.

FRESH ARM

The Orioles recalled RHP Jimmy Yacabonis from Triple-A Norfolk and optioned RHP Alec Asher to Norfolk.

TRAINER'S ROOM

Rays: SS Tim Beckham was back in the lineup after missing Saturday's game with a sore left ankle. … SS Adeiny Hechavarria was rested after playing successive days.

Orioles: SS J.J. Hardy, on the DL with a fractured wrist, said his recently diagnosed fractured right rib won't slow his effort to return. … Closer Zach Britton (forearm) will have his final rehabilitation outing Monday at either Class A Frederick or Triple-A Norfolk, depending on the weather.

UP NEXT

Rays: After a day off Monday, Tampa Bay opens a two-game series against the Cubs at Wrigley Field. "We're fortunate we get to play in a lot of cool environments," said Rays pitcher Chris Archer, who will start Tuesday. "Wrigley is definitely one of them."

Orioles: Wade Miley (3-6, 4.54 ERA) helps Baltimore launch a three-game series in Milwaukee on Monday afternoon.