ANAHEIM, Calif. — The Rays couldn't have felt better taking a three-run lead into the bottom of the ninth inning Thursday after a hard-fought and relatively well-played game. And they couldn't have felt any worse the way it ended, a 6-5 loss on a three-run Mike Trout walkoff homer that, given the progress they'd shown in Seattle, may have been the most staggering of their already frustrating season. "Very difficult,'' manager Joe Maddon said. "You can't take too many mulligans like this. There's not that many available. … You get a couple of these a year, I think, whereas you should have won and you lost them.'' The Rays had every reason to feel the game would be decided with closer Grant Balfour walking off the mound. They didn't expect it to be when Maddon made the unusual move of pulling him after Balfour allowed the first three batters of the ninth to reach, on two walks and an RBI single. Maddon instead summoned Brad Boxberger, and that didn't work out either, as he missed badly with a 1-1 changeup and allowed the three-run homer that was the first walkoff hit of Trout's career. "Just thinking right there, looking at all my work that we have, that Boxberger had a better chance of striking Trout out than (Balfour) did,'' Maddon said. "I didn't want the ball moved. But I was wrong. He moved the ball pretty good right there.'' Maddon said he pulled Balfour because of what he did, walking the Nos. 8 and 9 hitters, and how he did it. "Velocity was fine,'' Maddon said. "Not wanting to come after them in the zone, that's what it looked like to me because he had good stuff.'' Balfour was obviously not happy to be taken out, standing on the rubber as if he was going to keep pitching even as Maddon made his way to the mound, then handing him the ball and heading briskly off without a word. "It's his decision, he went with it. Personally, I'm disappointed by it. I want to be out there 'til the end,'' Balfour said. "I want to be out there to finish it. Anytime I have to come out in the ninth is a bad thing for me.'' Balfour faulted himself, noting he was ahead of Hank Conger 1-and-2 before putting him on on eight pitches, and Efrem Navarro 0-2 before throwing four consecutive balls. "Overall it's just disappointing,'' he said. "I'm trying to make too good of a pitch I think or trying to over-throw. I see a couple things I need to be a little better on mechanics-wise. … I get ahead and I'm not putting them away.'' But he also shared some blame, saying he was surprised the ground ball Collin Cowgill hit to the right side got through because of how the Rays infield defense was aligned — indicating, though not specifically identifying, second baseman Sean Rodriguez, who was playing more up the middle against the right-handed hitter. "I got my ground ball, but, I don't know, it shoots the hole,'' Balfour said. "Frustrating to be honest, because, playing a guy to pull, whatever. Trying to get a double play ball there, feel like you get a double play ball there, and it doesn't work out.'' Balfour said he would have pitched Cowgill, who he also was ahead of 1-and-2, differently — he was working him away — if he knew the Rays were positioned that way, saying again that it was frustrating, and then eventually said it was his own fault for not noticing. But Maddon had made it sound like the damage was already done with the two walks, mindful of what happened in Chicago April 25 when Balfour struggled in the ninth and gave up a walk-off grand slam to Jose Abreu. So even though Trout was 0-for-6 (with four strikeouts) against Balfour and Boxberger, who had only faced Trout in the minors, had already warned up and assumed with Balfour in the game his night was over, Maddon made the move, with dangerous Albert Pujols looming. "Eight and nine is coming up and he walks both those guys and a base hit and I did not want to see what had happened last time in Chicago,'' Maddon said. "I really though Boxy had a chance to strike those guys out. He just got a pitch in a bad spot to Trout.'' Said Boxberger: "I tripled up on a changeup and it just leaked in and he was able to get it. I tried to get it away but it stayed in.'' The end ruined what had otherwise been a solid night for the Rays, who seemed on their way to a third straight win, overcoming extreme temperatures, 95 degrees at first pitch after triple digits in the afternoon, leading them to take batting practice in shorts and T-shirts. Erik Bedard was sharp for a fourth straight start, retiring the first eight and working into the sixth, allowing only four hits and a pair of unearned runs. Brandon Guyer took advantage of a rare start to lead an offense that got big hits from several players. Desmond Jennings made a tremendous defensive play, racing back to the wall and robbing C.J. Cron of a two-run homer. Relievers Jake McGee and Joel Peralta were sharp. There was some issues, too, as shortstop Yunel Escobar made his seventh error, matching his total from all of last year, and usually sure-handed first baseman James Loney booted a grounder that led to two Angels runs in sixth after the Rays took a 4-0 lead. Also the Rays were on the wrong end of two calls — both on Jennings throws to second base — that were reversed by replay. But the story was the ending, as much the homer Boxberger allowed as what Balfour — who now has a 6.46 ERA — did to put them in that position. In 15? innings over games, Balfour has allowed 11 hits and, of more concern, given up 14 walks. "He was way better command than that,'' Maddon said. "I think it's just a matter of approach. We'll get him right, get him back in the strike zone. Because that's the kind of game we should be able to finish off.'' Balfour said his primary problem has been inconsistency. "It's been kind of sporadic,'' he said. "I haven't been on the top of my game. We can see that. Otherwise I'm out there 1-2-3 and it's all over. I've been a lot better and I need to get better. There's no two ways about it.'' Maddon said he wasn't concerned of any lingering impact on Balfour from being pulled, and that if they have a save situation Friday night he will get the call. "You know what, I'm worried about the team,'' he said. "Who's more aware of psychological components than me? "But in that moment right there, based on what we've seen Boxy able to do, and that part of the order coming up, and if it had been different batters that he had walked as opposed to 8-9 that would have maybe made it a little more different. But 8-9, and here comes 2-3-4, I didn't like it.'' Marc Topkin can be reached at [email protected] Follow him on Twitter at @TBTimes_Rays.