BALTIMORE — Amid a sea of waving orange towels and unwavering hope, a new era of baseball arrived at Camden Yards on Friday.

The Baltimore Orioles and the Kansas City Royals, two cornerstones of early American League expansion, had never played each other in the postseason, despite distinct periods of success in both towns, especially in the 1970s.

In the first 17 years after the playoff format was introduced in 1969, one or the other team was in the American League Championship Series in all but four of those years, though neither had been to the Championship Series in a very long time.

So, on a cool night that provided a fitting backdrop for an October game, the teams finally engaged in a battle worthy of the wait. The Royals took an early four-run lead, and the Orioles fought back to even the score after six innings.  

But in the top of the 10th Alex Gordon hit a leadoff home run off Darren O’Day and Mike Moustakas added a two-run shot off Brian Matusz. The Orioles scored a run in the bottom of the 10th, but the Royals held on for an 8-6 victory in Game 1 of the A.L.C.S.

The surging Royals, who won their first two games of the division series with extra-inning home runs, became the first team to hit three go-ahead home runs in extra innings in a single postseason.

Gordon’s homer helped make up for the fact that the Royals had the bases loaded with nobody out in the top of the ninth but failed to score. Zach Britton, the Orioles reliever, walked three straight batters, throwing 12 consecutive balls. But Eric Hosmer hit into a fielder’s choice.

O’Day, the side-arming right-hander, replaced Britton and got Billy Butler to hit into a double play — shortstop J. J. Hardy to second baseman Jonathan Schoop and on to Steve Pearce as the announced crowd of 47,124 roared its approval, at least for a short while.

Both teams carried momentum into the series, with neither losing a postseason game entering this series. The Orioles, who last competed for the pennant in 1997, swept the Detroit Tigers in the division round. The Royals, whose last appearance in the playoffs came in 1985, the year they won the World Series, did the same to the Los Angeles Angels after beating the Oakland Athletics in a dramatic, extra-inning wild-card game.

Anticipation for this unprecedented matchup began with tens of thousands of Orioles fans dressed in black and orange, swarming the streets around the stadium for hours in advance, and then bringing the stadium to life with their energetic cheers once the game began.

A light rain started falling in the middle innings, but the game went on, with Chris Tillman, the starting pitcher of the Orioles, facing the Royals’ James Shields.

The Royals were the first to score as Alcides Escobar homered to left field off Tillman in the third inning. Kansas City would score three more times in the inning, even after Tillman came within inches of ending the inning with the bases loaded and only one run in.

With one out, Nori Aoki singled to left field and Lorenzo Cain walked. Tillman struck out Eric Hosmer looking, but Billy Butler singled to load the bases. The next batter, Alex Gordon, worked a 2-2 count against Tillman, setting the stage for two more critical pitches in the at-bat.

The next pitch was a brilliantly executed backdoor curve that was right on the outer edge of the strike zone, nearly impossible for Gordon to drive. So he took it, and the home-plate umpire, Tim Timmons, gave him the benefit of the doubt, calling a ball to bring the count full.

The next pitch was a fastball and Gordon lofted it into right field for a double as all three runners scored, and Gordon advanced to third on an error by Schoop as the Royals grabbed a 4-0 lead.

The Orioles added a run in the bottom of the inning when Nick Markakis doubled off Shields and scored on a single by Adam Jones.

The Orioles chipped some more at the deficit in the bottom of the fifth. Trailing by 5-1, the Orioles put their first two hitters on base, when Markakis and Alejandro De Aza singled against Shields. Jones then reached on a fielder’s choice and Nelson Cruz doubled home De Aza as Jones went to third, making it 5-2. At this point it appeared Shields was in some trouble, but Royals Manager New Yost stayed with him, even after he walked Pearce to load the bases.

Shields responded by striking out Hardy, but Ryan Flaherty, a left-handed batter facing the right-handed Shields, hit a single to right field. Jones and Cruz scored to bring the Orioles within a run, 5-4. The next batter, the last for Shields, hit a line drive, but the second baseman Omar Infante was in position to catch it for the third out.

The Royals retained the lead, but the Orioles would wipe it out an inning later against the Royals bullpen. Schoop walked against Brandon Finnegan and went to second on a single by Markakis, and then was lucky not to be picked off. With De Aza at the plate, Royals catcher Salvador Perez, who has a terrific arm, saw Schoop too far off the base and fired to second. Schoop knew he would have been out, so he broke for third, and Escobar’s relay to Moustakas was wild. Schoop was safe at third and Markakis moved up to second.

De Aza then placed a little flare perfectly over Finnegan’s head, in front of Escobar, who dove but could not catch the ball. Everyone was safe, and Schoop slid home to finally even the score, 5-5, with more drama to come.