BALTIMORE _ Dylan Bundy finally got his groove back.
The Orioles right-hander _ whose season had spun out of control over his previous 11 outings going into Thursday night _ had been searching for answers.
He'd talked repeatedly about the need to locate his fastball better. But after his most recent start, in Tampa Bay last Friday night, before saying his frustration level had reached its limit _ 10 out of 10, in his words _ he added that he needed to start throwing his pitches with more conviction.
And that was the Bundy who suddenly re-emerged Thursday night against the contending Oakland Athletics, a confident pitcher able to use multiple weapons to avoid a big inning and remain in control of a game.
In steering the Orioles to a 5-3 win over the Athletics _ a win that avoided a three-game sweep, ended a six-game losing streak and halted a stretch of 10 losses in 11 games _ Bundy looked more like the pitcher who ran out to a quick start to the season in this year's first month rather than the one who plodded through most of the second half.
Going into this start, there was some question whether it might be his last of the season. Despite wanting to find a way for Bundy to end this season on a positive night, the club wondered whether he might be too tired to do so.
It helped Thursday that the Orioles (42-104) gave him a lead early, using some first-inning small ball to create a 2-0 cushion.
Bundy recorded his first quality start since Aug. 4, holding the Athletics (89-57) to two runs on six hits over six innings. He struck out eight and walked none, a dramatic shift from his previous start, when he walked a season-high five batters.
Bundy (8-14), who had an 8.83 ERA over his previous 11 starts, earned his first win since July 29 at Tampa Bay.
He worked ahead of Oakland hitters throughout, posting 16 of 24 first-pitch strikes.
His slider Thursday might have been his best of the season. Of the 20 sliders A's batters swung at, the A's put just three in play. And seven of Bundy's eight strikeouts came on the slider, which was effective both in the strike zone and as a chase pitch down and away.
He recorded 12 swinging strikes on the slider, getting a 40 percent swinging strike rate on it. He recorded no swinging strikes on the slider in his previous start, and in his previous six starts combined, he had a 22.8 percent swinging strike rate on the pitch.
Though Bundy allowed runs after each inning in which the Orioles scored, he limited the damage. He allowed a solo homer by Stephen Piscotty _ Bundy's major-league-high 38th long ball surrendered _ with two outs in the second inning after the Orioles took a 2-0 lead in the bottom of the first, but nothing else that frame.
After a two-run fourth, Bundy allowed a run in the fifth on a double by Marcus Semien off third baseman Renato Nunez's glove and an RBI single by Nick Martini over into left over Nunez.
But Bundy bore down from there in a situation that has often recently gotten away from him. He threw a first-pitch slider to Josh Phegley, got him to foul back a high fastball, then after Phegley passed on a slider in the dirt, he caught Phegley looking at a strike-three fastball.
Bundy then won a six-pitch battle with leadoff hitter Ramon Laureano, striking him out to end the inning despite falling behind 2-1. Bundy struck Laureano out by getting him to swing through a full-count slider
The Orioles' bullpen bent but didn't break in the late innings with Mychal Givens entering a 4-3 game with one out and the bases loaded and retiring the first two batters he faced to end the inning.
After pitching a scoreless seventh, Miguel Castro allowed back-to-back leadoff singles in the eighth. Left-hander Paul Fry entered and struck out Jed Lowrie, but then walked Khris Davis and Matt Olson, the latter of which walked in a run.
But Givens entered the game and struck out Piscotty and inducted an inning-ending flyout to right by Semien.
After that, the Orioles added an insurance run on Jace Peterson's opposite-field double down the left-field line off A's reliever Jeurys Familia that scored Tim Beckham.
Givens worked around a leadoff walk in the ninth _ getting an inning-changing diving catch from second baseman Breyvic Valera in shallow right field _ to convert his seventh save.
The Orioles took a 2-0 lead in the first after bunt singles by Cedric Mullins and Jonathan Villar came around to score on Tim Beckham's two-out, two-run single off Oakland start Brett Anderson.
They went up 4-1 in the fourth on back-to-back run-scoring singles by John Andreoli and Valera. Trey Mancini opened the inning with a single, and two batters later went to second on Nunez's single. Both runners moved into scoring position on a wild pitch before hits by Andreoli and Valera chased Anderson from the game.