SEATTLE – Just when it seemed the Mariners hit rock bottom Wednesday night, they hit back with four two-out runs in the eighth inning in a rousing 8-7 victory over the Los Angeles Angels.

Jean Segura pulled a two-run single through the left side after Jarrod Dyson served a two-run double into short right field.

“It’s a game to build on,” Dyson said. “That’s a momentum-builder right there. To have the lead, get it taken from you, then come back and take the lead. It’s something to build on. That’s something we needed right there.”

Segura said he wasn’t sure his grounder would find a hole.

“I just hit it,” he said, “and put my head down and ran to the base. Then I heard the crowd going crazy, and I though, ‘Oh, it went through. Thank you.’ ”

And this time, after two failed attempts earlier this season, Edwin Diaz closed out a victory over the Angels. He gave up a two-out homer to Kole Calhoun and hit Mike Trout with a pitch before striking out Albert Pujols.

“I actually thought he threw the ball much better tonight,” manager Scott Servais said. “He was aggressive. Obviously, Kole Calhoun is seeing the ball very well off of him. Kole is a very good fastball hitter.”

Before their four-run rally, the Mariners appeared headed toward an appalling loss. They carried a 4-0 lead into the sixth inning behind Hisashi Iwakuma – and everything fell apart.

Let’s back up.

Iwakuma sailed through the first four innings but wasn’t the same after getting hit in the left knee by an Andrelton Simmons liner to start the fifth inning. Iwakuma finished the inning but failed to get an out in the sixth.

“He tried to battle through it,” Servais said, “but he obviously wasn’t as sharp when he went back out there for the sixth. Sometimes when it goes with Kuma, it goes pretty quick. That’s what we were seeing tonight.”

Let’s back up further.

The Mariners were leading just 1-0 entering the fifth. That run came on a two-out homer in the first inning by Robinson Cano against Angels starter Ricky Nolasco.

Segura’s two-run homer keyed a three-run fifth that knocked out Nolasco and stretched the lead to 4-0 before the Angels went nuclear in the sixth.

Calhoun started the LA comeback with a leadoff double to right, and Trout followed with a 412-foot bomb to center. When Albert Pujols lined a single, Servais went to the bullpen for Emilio Pagan.

“We were short in the bullpen,” Servais said, “so we tried to figure out a way to piece it together. A tough spot to bring Pagan in, but we knew he was going to have to pitch (when Iwakuma didn’t make it through six innings).”

It was Pagan’s major-league debut and didn’t go well.

Luis Valbuena floated a single to right that moved Pujols to third. Simmons then sent a drive to deep left that Guillermo Heredia caught above the wall. It was a sacrifice fly instead of a three-run homer.

It was also a temporary reprieve.

Ben Revere and Cliff Pennington followed with line-drive singles, which tied the game and put runners at first and third with still only one out. Servais replaced Pagan with Nick Vincent.

The Angels tried to squeeze a run home with a bunt by Martin Maldonado, but first baseman Danny Valencia grabbed the ball and tagged Maldonado as Revere held and Pennington moved to second.

Maldonado apparently didn’t like the tag, said something to Valencia, and the exchange quickly escalated with both benches and bullpen briefly emptying.

Order restored, Escobar rocked a two-run double off the center-field wall. The Angels led 6-4.

And how did the Mariners respond? They took three third strikes later in the inning. It didn’t look good.

“That was tough for us right there,” Dyson said. “But you know? You just keep grinding until the last out is made. The game wasn’t over when they came back. We knew we were just a crack away from tying it up.”

PLAY OF THE GAME: Heredia’s catch in the sixth snatched a three-run homer away from Simmons. It was a heck of a play, but it didn’t stop the Angels.

PLUS: Reliever Jean Machi got the victory by pitching a scoreless eighth inning. He pitched two scoreless innings in Tuesday’s loss…Segura’s four RBIs were a career high. He had three RBIs on 11 previous occasions…Nelson Cruz had three singles in four at-bats, and two of the singles would have been doubles if he wasn’t hobbling because of a sore left hamstring. His average is up to .327…Ben Gamel had two doubles in five at-bats.

MINUS: Pagan is sporting an 81.00 ERA after giving up three runs in one-third of an inning…Vincent had not allowed an inherited runner to score this season before allowing two to do so in the sixth inning…Heredia was 0 for 4 with three strikeouts.

STAT PACK: Cruz’s single in the first inning extended his hitting streak to 12 games. The Mariners are the only team this year to have two players with streaks of 12 games or longer. Mitch Haniger had a 13-game run from April 6-19.

QUOTABLE: “We bounced back and put ourselves in a position to win the game on our terms,” Angels manager Mike Scioscia said, “but then we couldn’t get that one pitch to get out of that eighth inning.

“Give those guys credit, they came back and got it.”

SHORT HOPS: Angels reliever Blake Parker got the loss after allowing four runs in two-thirds of an inning. He spent most of last season at the closer at Triple-A Tacoma…Trout’s two-run homer in the sixth inning extended his hitting streak to a career-best 16 games…the attendance of 13,799 was the smallest of the season through 11 games this season at Safeco Field.

Top stories in Seattle Mariners

updated A person familiar with the negotiations tells The Associated Press the New York Yankees have agreed to acquire left-hander James Paxton from the Seattle Mariners for left-hander Justus Sheffield and two other prospects.