The Orioles got into the Nationals’ bullpen tonight after the seventh inning.

The story could end right there, since the rest of it has become so predictable. But this one had a few twists and turns that left the Orioles in knots. Not at all what was expected to happen.

Pete Alonso delivered a 111.3 mph run-scoring double off Orlando Ribalta with two outs in the eighth inning, and he scored on pinch-hitter Samuel Basallo’s first-pitch single at 103.6 mph to erase a 3-1 deficit.

The game moved into extras, Ryan Helsley allowed an unearned run in the 10th, and Justin Lawrence marked his Nationals debut by leaving the bases loaded in the bottom half in the Orioles’ 4-3 loss before an announced crowd of 29,616 at Camden Yards.

Andrew Kittredge worked around a leadoff single in the ninth to keep the score tied, but the Orioles fell to 39-45.

“I mean, halfway through the season, which means there’s a lot more baseball to be played,” said Jeremiah Jackson. “I don’t think there’s any panic on our end. I think we have a great ballclub. We’re just going to keep going every day and keep playing a full nine innings and just do our thing.”

CJ Abrams threw out Jackson at the plate on Taylor Ward’s ground ball in the 10th. Gunnar Henderson kept the Orioles alive with a single and Alonso walked, but Basallo grounded out.

“Yeah, I mean, contact play, as soon as he makes contact, you go,” Jackson said.

“It’s a tough play for Abrams,” said manager Craig Albernaz. “He made a great play. It’s one of those things where the infield’s drawn in, you got to go on contact, read, force them to make a play. Knowing we have Gunnar coming up, you know it could change the game.”

Helsley gave up a seeing-eye, ground ball single to Daylen Lile in the 10th that scored the automatic runner, and Jorbit Vivas reached on a roller near the plate at 48.1 mph. Nasim Nuñez struck out with the count full, Drew Millas grounded into a force, and Jacob Young flied out.

Ribalta replaced PJ Poulin, who entered in the eighth and left a runner on base. The Orioles had three hits through the seventh against left-hander Foster Griffin.

The Nationals had the worst reliever ERA in the National League before tonight at 5.02, which also ranked 28th in the majors. They had epic late meltdowns in three consecutive games against the Phillies before arriving in Baltimore.

“I don’t think we assume anything,” Jackson said. “I think we play the full game and I think we did a good job of doing that. The outcome didn’t go our way, but you know, we battled to the end and got the scoring run on base. As far as process goes, that’s kind of all that we can ask for.”

Brandon Young allowed two runs and seven hits in five innings, with two walks and a career-high eight strikeouts. He threw 93 pitches before Rico Garcia replaced him in the sixth with his ERA at 3.11.

“His fastball had great life today,” Albernaz said. “He had a tough time finding the split early, and as the game went on, he started to get the feel for it. Same thing with his curveball, but no, his fastball really was the separator tonight for him.”

Luis Garcia Jr. broke a 1-1 tie in the fifth with a 418-foot leadoff home run at 114 mph. Garcia blistered a 3-0 fastball for his 14th homer.

José Tena followed with a double down the right field line and was stranded at third base. Young got two strikeouts on his slider.

Young’s career high in whiffs was 12 before tonight. He had 15 swinging strikes through the third inning and 19 by the fourth, most on the club this season. He finished with 23 but was behind 2-1.

“Felt good,” Young said. “Felt like my stuff was in a good spot in the bullpen. I think I had a good heater, and some of my splits were pretty good.”

Millas and James Wood struck out swinging at splitters after the Nationals put two runners in scoring position and one out in the fourth.

A leadoff walk in the first inning didn’t hurt Young, but Lile doubled with one out in the second and scored on Vivas’ single into left field.

The play came with a fundamental breakdown. Ward threw home, with no cutoff, and Vivas advanced to second base. But he didn’t budge.

Young stranded two runners in the third after a single and walk, recording two more strikeouts in a 23-pitch inning.

Blaze Alexander committed two errors on the same play, fielding and throwing, to put Vivas on second base leading off the sixth. Drew Millas singled with one out for a 3-1 lead.

Garcia doubled with two outs, but Millas was out at the plate, 9-4-2.

Griffin spent the past three seasons pitching in Japan and he brought an 8-2 record and 3.15 ERA into his 17th start. He walked two batters and struck out three in the first inning, struck out two more in the second and struck out the side in the third.

Foster tied his career high with a ninth strikeout in the sixth inning, which he finished at 98 pitches. Manager Blake Butera let him return for the seventh, and a comebacker, foul popup and liner to right left him at 112 pitches.

Foster held the Orioles to one run, and he retired the last nine batters he faced and 16 of 17.

“Big league pitcher,” Jackson said. “He’s here for a reason. It’s a tough game. His stuff was on today. We took some good swings, had decent at-bats. Just the nature of the game.”

“We didn’t have an answer for him,” Albernaz said. “He went seven innings, nine punchouts. I mean, we couldn’t get anything going offensively against him. He’s having a good year and does a great job of changing speeds. He has the three breaking ball shapes, and he does a great job of backdooring it to righties and then getting the cutter in on the righties and getting the changeup off that. We just didn’t have an answer for him.”

Mr. 46

Catcher Chadwick Tromp became the 46th player to appear in a game for the Orioles this season, and he celebrated the occasion with an RBI.

Blaze Alexander began the second inning with a single. Jackson grounded into a force for the second out, but Nuñez’s throw sailed over Garcia at first base for an error.

Jackson moved into scoring position and crossed the plate with the tying run on Tromp’s single into right field. Tromp poked a 2-2 fastball the opposite way and clapped as he rounded first.

Tromp led off the eighth with a bloop single down the left field line for his second multi-hit game this season, the first also against Washington on May 22, and he scored on Alonso’s double off the left field wall.

Tromp had three RBIs in 12 games with the Braves before returning to the Orioles in June as a free agent.

Mr. 500

Alonso played in his 500th consecutive game tonight. He struck out twice and lined to left field before the double and walk.

According to the Elias Sports Bureau, 38 consecutive-game streaks of 500 or more exist since 1900. Braves first baseman Matt Olson owns the longest active streak at 863.

They have a long way to go to set the record.

Down on the farm

Double-A Chesapeake’s Sebastian Gongora no-hit Harrisburg for five innings. He was removed after 65 pitches. Gongora walked one and struck out two.

Aron Estrada hit his 13th home run.

High-A Frederick’s Boston Bateman allowed one run and two hits with four walks and seven strikeouts over four innings. His ERA is 3.92. Twine Palmer followed with five scoreless innings and only two hits allowed.