ANAHEIM -- Considering it was the longest nine-inning game in the 54-year history of Angel Stadium, the Angels’ 10-9 walk-off win over the A’s on Wednesday had its share of unlikely moments, including the Halos erasing an early six-run deficit, only to lose a late lead and still come back

ANAHEIM -- Considering it was the longest nine-inning game in the 54-year history of Angel Stadium, the Angels’ 10-9 walk-off win over the A’s on Wednesday had its share of unlikely moments, including the Halos erasing an early six-run deficit, only to lose a late lead and still come back with the much-needed victory.

It had a fitting ending with backup catcher Dustin Garneau delivering the knockout blow with a ground-rule double to left on a high fly ball that Robbie Grossman couldn’t track down. It allowed Brian Goodwin to score from second after he singled and stole second with two outs off reliever Lou Trivino. Garneau's game-winner left the bat at 96 mph at a launch angle of 42 degrees, giving it an expected batting average of .030 according to Statcast, but it got the job done and ended the game after four hours and 13 minutes.

• Box score

“I knew I hit it pretty well but once it went up I thought, ‘It's too high,’” Garneau said. “I don’t know if it will go anywhere. Then it kept drifting, and somehow it went down and found some dirt.”

Garneau’s double ended up being the most important hit of the game, but here’s a look at other key moments from the Angels’ crazy win.

Trout’s intentional walk

After the A's took the lead with two runs in the eighth, the Angels tied it in the bottom of the inning thanks to an unusual decision from A's manager Bob Melvin to walk Mike Trout intentionally with two on and two out to load the bases for Shohei Ohtani .

It put the go-ahead run in scoring position for the Angels, but the A’s liked the matchup of bringing in lefty Ryan Buchter to face Ohtani. Both Trout and Ohtani had homered earlier in the night, as Trout crushed a two-run shot off Daniel Mengden to help the Angels get back into the game in the third, and Ohtani smacked a go-ahead, three-run blast in the fourth off reliever Yusmeiro Petit.

"Ever since I started playing baseball, I've never had anyone get intentionally walked in front of me, especially when first base was filled like tonight,” Ohtani said through interpreter Ippei Mizuhara. “I didn't really get a feeling like I needed to do something more. But since it's Trout, they don't want Trout to beat them, and I know that. It's kind of natural for them to put him on base."

The decision also surprised Trout, but Ohtani made the A’s pay by drawing a walk to tie the game. Ohtani showed some emotion flipping his bat as he got to first. Albert Pujols struck out with the bases loaded to end the inning, but Ohtani’s walk loomed large and helped him set a career-high with four RBIs on the night.

“I was obviously ready to hit,” Trout said. “It is what it is. Pass the baton. Obviously Ohtani had a great at-bat, worked a walk.”

Melvin explained his rationale after the game, as he saw Trout as a bigger threat than Ohtani.

“I wasn’t going to let him beat me in that situation,” Melvin said. “There’s always some thought. Ohtani’s not the easiest guy in the world to go after. But going into the game, the guy you don’t want to beat you is Trout. It’s a tough decision, but [I] felt like that was our best chance.”

Lucroy almost makes epic tag

Ace reliever Ty Buttrey threw a scoreless seventh and came back out for the eighth, but he was hurt by a one-out walk and a single from Matt Chapman before giving up a game-tying RBI single to Matt Olson, who was thrown out at second on the play. It came on Buttrey’s 43rd pitch of the night -- his career high was previously 33 pitches.

Closer Hansel Robles was brought in to face Khris Davis with two outs, but he bounced a slider that got past catcher Jonathan Lucroy . Chapman aggressively went for home on the play despite Davis motioning to him to hold up. Lucroy dived back into home and Chapman was initially ruled out by home-plate umpire Will Little. But after a review, the call was reversed, giving Oakland the lead.

Robles, though, recovered to throw a scoreless ninth, pitching around a leadoff double from Grossman. The Angels were fortunate to come away with the win as a result, as both Buttrey and Robles aren’t expected to be available in the series finale on Thursday. The same goes for right-hander Noe Ramirez, who threw 2 1/3 scoreless innings in relief of right-hander Felix Pena, who lasted just 1 2/3 innings and surrendered seven runs on eight hits. The Angels are expected to make a few roster moves to bring fresh arms to the bullpen for the finale.

"Once we got close and got the lead, some guys pitched really well out of the bullpen," Angels manager Brad Ausmus said. "Buttrey threw nearly 45 pitches, Robles one-inning plus, [Justin] Anderson. We were kind of running low at pitching at this point. Cody [Allen] was going to be the next guy in. We had that extra-inning game in Oakland we were fortunate enough to win, and we won this one as well."