BALTIMORE (AP) Presented with an opportunity to make up ground in their playoff run, the Oakland Athletics were mounting a comeback against the Baltimore Orioles' shaky bullpen in the eighth inning of a tight game.

Givens put an end to the potential rally, and the Orioles snapped Oakland's six-game winning streak with a 5-3 victory Thursday night.

Stephen Piscotty homered for the A's, who fell 3 1/2 games behind first-place Houston in the AL West and 1 1/2 back of the Yankees for the top wild-card slot.

Down 4-2 in the eighth, Oakland hit successive singles off Miguel Castro and loaded the bases with one out. After Paul Fry walked Matt Olson to force in a run, Givens struck out Piscotty and retired Marcus Semien on a fly ball.

Jace Peterson doubled in a run in the bottom half, and Givens finished for his seventh save despite issuing a leadoff walk in the ninth.

"We give ourselves opportunities a lot and typically we come through," Oakland manager Bob Melvin said. "We had a lot of chances, especially in the eighth inning, which was a big inning for us. We didn't come through, especially with Stephen up at the plate."

The credit goes to Givens, who's been closing since Baltimore traded Zach Britton in late July.

"That was a pretty good pitcher they brought in, especially against righties," Melvin said.

Dylan Bundy had eight strikeouts in six solid innings for the Orioles, who snapped a six-game skid and avoided being swept for the 22nd time.

Bundy (8-14) gave up two runs and six hits to earn his first win since July 29. The right-hander was 0-5 in his previous seven starts.

"He made them beat his breaking ball," Orioles manager Buck Showalter said. "He had good command of it and they didn't seem like they were seeing it or following it."

Oakland activated lefty Brett Anderson from the 10-day disabled list to make his 14th start of the season. In his return from a forearm injury, Anderson (3-5) allowed four runs and didn't make it out of the fourth inning.

His night began when Cedric Mullins topped a ball down the third-base line that rolled tantalizingly close to being foul but never was. Four batters later, Tim Beckham hit a two-run single to put Baltimore ahead to stay.

"Today was about as frustrating as it could get," Anderson said. "Every groundball they hit found a hole."

Piscotty made it 2-1 in the second with his 24th home run, the major league-leading 38th allowed by Bundy.

The Orioles got RBI singles from John Andreoli and Breyvic Valera in the fourth, and Oakland answered with a run-scoring single by Nick Martini in the fifth.

TRAINER'S ROOM

Athletics: RHP Trevor Cahill had an MRI on his right shoulder due to soreness in his upper back. Melvin scratched Cahill from Saturday's start and will probably go with reliever Liam Hendriks. Melvin said that if Cahill responds to treatment, he could start twice during the Sept. 18-23 homestand.

Orioles: RHP Andrew Cashner had an MRI on his left knee. Showalter said no structural damage was found, but the pitcher got a cortisone shot and could miss a start. ... RHP Alex Cobb won't pitch until Sept. 21 at the soonest because of an irksome blister, Showalter said.

MORE THE MERRIER

The Athletics have suited up 53 players this season, one short of the Oakland record set in 2007 and matched last year.

Baltimore has used 55 players this season, most since the team moved from St. Louis in 1954. That includes 28 pitchers, an Orioles record.

UP NEXT

Athletics: RHP Edwin Jackson (5-3, 3.26 ERA) is on the mound for the opener of a three-game series at Tampa Bay.

Orioles: RHP Luis Ortiz, obtained in the Jonathan Schoop trade with Milwaukee on July 31, makes his first major league start in a matchup with the visiting White Sox.

---

More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports