BALTIMORE — Having worked the first two innings of Sunday’s 4-1 win as the opener, Ryne Stanek was finishing up his shoulder exercises in the clubhouse during the fifth inning when he heard one of the Orioles TV guys note the Rays had yet to allow a baserunner.“I didn’t even know it was going on,’’ he said. “I usually go back out to the dugout, so I put that on fast forward and scurried out there.’’Nicole Bellini came to Camden Yards to watch fiance Ryan Yarbrough, just back from Triple A, pitch after Stanek. But also to hang out with one of her bridesmaids, and they were taking fun pictures in rightfield when she glanced at the MLB app on her phone and saw a “Perfect Game” notice.“I was like, ‘Oh geez, I should probably go watch,’ ’’ Bellini said.Rookie third baseman Mike Brosseau glanced up at the scoreboard after seven innings, saw the zeroes and it hit him the Rays may be headed toward history.“I thought about the game a little more, and I realized something special might happen,’’ he said.Even the man of the moment on the mound, Yarbrough, didn’t know they were closing in on what would have been the first ever combined perfect game. He didn’t pay attention to the first two innings as he prepared in the bullpen, took over in the third and spent his time between innings in the tunnel to the clubhouse to escape the sweltering heat.It wasn’t until he warmed up in the eighth, when he heard some fans yelling at him not to blow it.“I’m like wait a minute … ,’’ Yarbrough said. “I really had no clue.’’The lefty got the Rays through the eighth, and 18 of the first 24 Baltimore batters, as the excitement built in the dugout and spread around the stadium. There had been 23 perfect games in major-league history, including three against the Rays, but all came from just one pitcher.As No. 7 hitter Hanser Alberto stepped to the plate to start the ninth, Yarbrough did some quick math and fully grasped the moment.“It’s the bottom of the order and it’s the bottom of the ninth, so obviously things are kind of lining up here,’’ he said.The suspense ended quickly. Alberto slapped Yarbrough’s first pitch, a cutter like he had used so effectively, for a single to right.“Obviously I felt pretty good about the pitch,’’ Yarbrough said. “He just kind of snuck it through the right side right there. Not a big deal. Just kind of smiled about it afterward. That would have been kind of a cool moment.’’With relief help from Emilio Pagan, the Rays held on for the win. But the near miss at perfection left a sting.“It would have been cool,’’ catcher Mike Zunino said. “It hurts a little more knowing it’s never been done before.’’Notably, fittingly, maybe even ironically given the Rays’ reliance on advanced strategy and metrics, Alberto’s ball went through the usual second base slot vacated by the shift.Alberto, determined to keep the O’s from being party to history, said he was aiming to take advantage.“I was looking the other way since my first at-bat because they shift me,’’ he said. “That’s an easy hit, but he was pitching pretty good.’’Manager Kevin Cash said he saw no reason to abandon the shift in that situation because they’d been doing it against Alberto before. Yarbrough said he had no issues with the shift given its prior success.“It’s been one of those things where it’s helped me so much throughout the year and that’s not a part of it,’’ he said. “We’ve had it before and I don’t blame it at all.’’Stanek, refreshed by the All-Star break, zipped through his first two innings. Yarbrough, brought back from Durham after a planned one-appearance stay, came out sharp, mixing the cutter, curveball and changeup well, working in and out and keeping the Orioles off-balance. They didn’t threaten much early, with a couple potential infield hits taken away by shortstop Willy Adames and second baseman Joey Wendle, and rightfielder Austin Meadows running down a liner.“Both of them were really impressive,’’ said Cash, who acknowledged he was less concerned with the perfect game than the final score, as the game got a little tight when the Orioles got two more hits, a run in and the tying run to the plate.Meadows and Brosseau homered to lead the offense as the Rays improved to 55-40 and stayed within six games of the Yankees heading into a four-game series in New York.The Rays have never thrown a perfect game in their 22-season history, the previous closest bid coming from former Ray Chris Archer when he retired the first 19 Detroit batters (61/3 innings) on July 29, 2015. They have produced one no-hitter, Matt Garza’s gem against the Tigers on July 26, 2010.They’d been on the other side of perfection, including baseball’s most recent one by Seattle’s Felix Hernandez on Aug. 15, 2012. Oakland’s Dallas Braden (May 9, 2010) and the White Sox’s Mark Buehrle on July 23, 2009 also turned in perfect efforts against the Rays.On Sunday, the Rays came within three outs of a role reversal and a fitting outcome for the team that introduced and maintains the opener strategy.“It would have been pretty sweet,’’ Stanek said. “Obviously if you’re the first to do something in baseball you did something. The game’s been around so long that most things have probably already been done. It would have been pretty spectacular if we could have finished it off.’’ Contact Marc Topkin at firstname.lastname@example.org. Follow @TBTimes_Rays.