SEATTLE (AP) Andrew Albers' perseverance paid off for himself and the Seattle Mariners.

The left-hander earned his first major league win in four years, pitching five effective innings as the Mariners beat the Baltimore Orioles 3-1 on Tuesday night to snap a five-game losing streak.

''You come up that first time and you think this probably isn't going to be the last,'' said Albers, called up from the minors earlier in the day. ''All of a sudden you go a couple, three years without it happening, and you certainly appreciate the opportunities more as they become fewer and fewer.''

The 31-year-old Albers (1-0) settled down after giving up Jonathan Schoop's 26th home run in the first inning. He allowed six hits for his first victory since Aug. 12, 2013, when he went 2-5 in 10 starts with Minnesota.

Acquired in a trade with Atlanta last Friday after going 12-3 at Triple-A Gwinnett, Albers made one relief appearance for Toronto in 2015 and did not get a decision in six appearances last season with the Twins.

He retired the final eight hitters he faced Tuesday, and four Mariners relievers set down 12 straight over four scoreless innings. Edwin Diaz pitched a perfect ninth for his 26th save in 30 opportunities.

''It means a lot, but at the same time, it's more important right now just winning ballgames,'' said Albers, also aided by a first-inning double play. ''Whether I get the W or somebody else gets the W, it really doesn't matter. Coming in here and getting to be part of a pennant race or wild-card race, that's pretty awesome. Right now, it's not about who gets it, it's about the team getting it, and tonight we were able to get one. That's a big deal.''

Seattle erased a 1-0 deficit with a run in the fourth and two in the fifth off Wade Miley (6-10), who yielded five hits in 4 2/3 innings.

The Mariners tied it in the fourth after Guillermo Heredia doubled and advanced on Robinson Cano's groundout. Nelson Cruz followed with a single to right field for his AL-leading 96th RBI.

Seattle made it 3-1 in the fifth. Danny Espinosa doubled and went to third when Miley mishandled Jarrod Dyson's sacrifice bunt. Jean Segura followed with an RBI single to left, sending Dyson to second.

Dyson advanced on Heredia's fielder's choice grounder and scored on Cano's bouncer to first when Heredia's hard slide into second upended shortstop Tim Beckham and prevented a possible double play.

''The man on second and the bunt,'' Miley said. ''Had a good look at him at third base right there if I could get that transfer and get it over to Manny (Machado). That changes a lot right there. Then first and third with nobody out, two speedsters on the bag . so it's tough to turn double plays. Just fell behind after that.''

Dyson prevented a run in the third, grabbing Adam Jones' sinking liner to center field and throwing out Machado, who was attempting to tag up and score from third.

Dyson's perfect throw home was his 11th outfield assist this season, tops in the majors.

''What a throw. That was kind of a game-changer at that point, I felt like, and a momentum-changer,'' Albers said. ''I was jogging behind the plate to back up thinking, `Aw shoot, I just gave up another one,' and then all of a sudden you see that throw, and it was like, `Oh my gosh, wow.' That was a huge play.''

ROTATING ROTATION

With starters Felix Hernandez and James Paxton both going on the disabled list this month, Albers became the 16th starting pitcher used by the Mariners this season. That is one shy of the club record set during the team's inaugural 1977 season when Seattle finished 64-98.

MARINERS MOVES

Albers was brought up from Triple-A Tacoma along with RHP Sam Gaviglio, who went 3-5 with a 4.62 ERA in two earlier stints with the Mariners this year. RHP Casey Lawrence and RHP Thyago Vieira were optioned to Triple-A, and RHP Christian Bergman was designated for assignment.

TRAINER'S ROOM

Mariners: 3B Kyle Seager sat out with what manager Scott Servais said appeared to be a stomach virus. Espinosa started at third. ... RHP David Phelps, on the 10-day DL with a right elbow impingement, will accompany the Mariners to Tampa Bay this weekend and is expected to throw off a mound there. ''If that goes well, you could see him activated pretty quickly,'' Servais said.

UP NEXT

Orioles: RHP Ubaldo Jimenez (5-7, 6.25 ERA) closes out the three-game series Wednesday afternoon. Jimenez has won only once in six starts since July 16. He has allowed 25 home runs in 116 2/3 innings.

Mariners: LHP Marco Gonzales (0-0, 6.48), acquired in a trade with St. Louis on July 21, makes his third start for Seattle. Gonzalez, who missed all of 2016 following elbow surgery, allowed one run and four hits over 4 1/3 innings in his last start.

---

More AP baseball: https://apnews.com/tag/MLBbaseball

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.