Twice on Wednesday night Bryce Harper strolled to the plate at Nationals Park with two runners on and one out. Another time there was a runner on second with one out. Three opportunities to produce the runs he’s expected to produce as the Washington Nationals’ cleanup hitter and superstar slugger. Three chances to ignite his team’s offense. But Harper has not resembled a cleanup hitter or a superstar or even an average hitter for weeks, and he failed to again in Washington’s 3-0 loss to the Baltimore Orioles, a game that ended more than five hours after first pitch because of a rain delay of nearly three hours.

In two instances, Juan Soto and Anthony Rendon reached base ahead of Harper. The first opportunity came in the first inning, and Harper hit a soft chopper to the first baseman, which turned into an inning-ending double play. His second chance came after the game had resumed in the sixth inning following the delay, and he popped out to shortstop in shallow left field. In between, he flew out to left field with Rendon, who went 2 for 3 with a double, at second base in the fourth inning.

Box score: Orioles 3, Nationals 0

Harper generated his best contact in the ninth inning, but his screaming line drive went straight to the first baseman as he finished the long night 0 for 4. He left five runners on base. He is 2 for his last 34 overall, a slump that has dropped his batting average to .209.

But the former MVP didn’t struggle alone. Daniel Murphy, who’s working to knock off the rust after an eight-month layoff, followed Harper in the sixth inning with a groundout to the pitcher to halt the threat. The Nationals didn’t manage to have multiple runners on base again until the ninth inning, when they loaded the bases against Brad Brach before Mark Reynolds struck out looking to seal Washington’s fifth shutout loss in June.

“For me, it’s not really about the hits,” Nationals Manager Dave Martinez said. “It’s about the at-bats. We lined out quite a few times today. I’m not too concerned about . . . we’ve got some pretty good hitters.”

The Orioles (21-51) beat Washington for the first time in five tries this season and won for just the second time in 12 games. They still own the worst record in baseball. The Nationals, meanwhile, mustered five hits and four walks — two hits and a walk came in the ninth inning alone — en route to their seventh loss in nine games. The offense was as quiet as the lean crowd that stuck around until 12:24 a.m. to watch the entire event.

Injury updates: Kintzler nearing return; no timetables for Wieters, Zimmerman

Five hours 18 minutes earlier, Gio Gonzalez began the night by striking out Trey Mancini during a scoreless first inning. Then a recent wart resurfaced. Gonzalez has built his early success this season, at least partly, on avoiding the home run. The left-hander allowed one long ball in his first eight starts. It was a solo blast, so he avoided big blows every fifth day for six weeks. Since then, the home run has haunted him.

On Wednesday, the problem resurfaced in the second inning, when Mark Trumbo walloped a 1-0 curveball to left field for a two-run blast. It was the sixth home run Gonzalez has surrendered in his previous six starts and the fourth straight start in which he has allowed one with at least one runner on base.

“I think we’re giving up way too many homers,” Martinez said. “I really do. We have to figure out a way to keep the ball in the ballpark and limit the damage.”

Otherwise, Gonzalez shut the Orioles out until the rain started. He took the mound for the fifth inning and threw a few warmup-pitches as the rain’s intensity increased before the umpiring crew finally stopped the game.

“It was just one pitch,” Gonzalez said. “Other than that, if I take one pitch back, I’d be really happy with what I was doing.”

Mike Rizzo on Bryce Harper’s struggles: ‘I think he’s handled them with class and dignity’

The rain delay began at 8:07 p.m. and concluded at 10:50 p.m., when Shawn Kelley, Gonzalez’s replacement, threw a strike to Craig Gentry. Kelley subsequently struck Gentry and the next two batters out, and was rewarded with his second career at-bat in the bottom of the inning. He was not there just to stand against right-hander Miguel Castro. He put up a fight and fouled a 95-mph fastball down the first base line before he struck out swinging at a slider.

Kelley hit for himself because Martinez wanted him to pitch the sixth inning, too, and his second frame didn’t go as smoothly. Adam Jones started it with a line drive to left field that Soto misplayed with a premature jump, giving Jones a double. Two batters later, Danny Valencia’s sacrifice fly expanded Baltimore’s lead to three.

That total was ample because the Nationals’ offense, despite putting runners on base for its cornerstone, couldn’t string anything together. Before the game, Martinez insisted Harper is healthy. He complimented his willingness to shift to center field and to different spots in the batting order when asked to. He explained that Harper, who took batting practice both in the cage and on the field Wednesday, has been relentlessly working with hitting coach Kevin Long, learning new drills, plugging away to snap out of his funk.

“He’s going to hit,” Martinez said. “And I know he’s going to carry us for a month or two or whatever. So let’s not overwhelm him with different things. He’s a good hitter, and his power numbers are really good, so it’s just kind of let him take a step back and just let him kind of feel things out and let him get going.”

But Harper didn’t get going Wednesday. He hasn’t gotten going for a while now, and the Nationals are feeling the consequences.