BALTIMORE (AP) -- After the Baltimore Orioles quickly ended their scoreless streak at 26 innings, Gabriel Ynoa handled it from there.
Ynoa pitched eight innings of five-hit ball, Manny Machado homered and Baltimore beat the Tampa Bay Rays 3-1 on Thursday night in a matchup between fading AL East teams.
Coming off a three-game sweep by Boston that included two straight shutout defeats, the Orioles snapped their scoring funk before making an out in the first inning.
Staked to a 3-0 lead, Ynoa (2-2) breezed through the Rays lineup in the finest start of his career.
"Command my fastball and then work on my breaking pitches and try to get the hitter out of balance," the right-hander said through an interpreter. "That was the game plan for today."
Ynoa struck out three and walked two in earning his first win as a starter in six career tries. He failed to go past five innings in any of his previous starts.
"He only threw, I think, two or three changeups. That's unusual," manager Buck Showalter said. "That tells you what type of command of two pitches he had."
Obtained from the New York Mets for cash in February, Ynoa spent most of the season in the minors. This was his eighth appearance with Baltimore, four of which came this month.
Brad Brach pitched the ninth for his 18th save in 24 opportunities, retiring pinch-hitter Kevin Kiermaier on a fly ball with runners at the corners and two outs.
Machado's two-run homer in the first inning off Matt Andriese (5-4) propelled the Orioles to their third win in 15 games. Baltimore has only a mathematical chance of reaching the postseason and must go 7-1 the rest of the way to avoid its first losing season since 2011.
Tampa Bay has lost nine of 13 since reaching the .500 mark on Sept. 5. The Rays began the day trailing Minnesota by four games for the second wild-card spot.
"Their guy on the mound kept us off balance enough, mixed in his slider well, pitched off his slider at times," manager Kevin Cash said. "We knew that coming in, but for whatever reason we couldn't pick up on it and piece anything together."
Baltimore took charge in the first inning, when rookie Austin Hays singled before Machado hit a 2-1 pitch for his team-leading 33nd home run. After Adam Jones doubled with one out, Trey Mancini delivered an RBI single.
Tampa Bay got a run in the third when Brad Miller doubled and scored on an error . But the Rays did not get another runner in scoring position until the ninth.
Andriese allowed three runs and seven hits over six innings.
"Giving up three runs in the first, at that point you just want to turn that into a quality start," he said. "I was able to do that."
The Rays obtained SS Osmy Gregorio, who was the player to be named from the Aug. 5 trade with the Mariners. Seattle acquired RHP Ryan Garton and C Mike Marjama in the deal. Gregorio hit .220 with two homers, 26 RBIs and 15 stolen bases in 55 games split between the Mariners' Arizona rookie-league team and Short-A Everett.
Traded from Tampa Bay to the Orioles on July 31, Tim Beckham was looking forward to facing his former team. But he remained sidelined Thursday, two days after having a wisdom tooth extracted. "Just trying to stop the bleeding right now," he said.
Rays: Kiermaier was out of the starting lineup for the first time since returning from the disabled list Aug. 18, and SS Adeiny Hechavarria didn't start for the first time since Aug. 24. "Just getting them off their feet," Cash said. "We've played quite a bit lately."
Orioles: Closer Zach Britton will get a stem-cell injection in his left knee on Friday. The procedure was delayed a day because "it's not something everyone carries on the shelf," Showalter said.
Rays: RHP Alex Cobb (11-10, 3.63 ERA), who has allowed one earned run or less in four of his last six starts, goes Friday night. He's 5-2 lifetime against Baltimore.
Orioles: RHP Ubaldo Jimenez (6-10, 6.57) starts for Baltimore, looking to pitch at least six innings for the first time since July.