Twins righthander Kevin Jepsen was one pitch away from getting out of the top of the ninth inning Tuesday night. Twice.

He lost an eight-pitch battle to Joey Rickard, who laced a double to left. Two batters later, Adam Jones lined a two-run single off a sprawling Oswaldo Arcia in left field.

And that’s how the Twins lost 5-3 for their sixth consecutive loss. Their bullpen entered the game ranked 22nd in the league in ERA, but got scoreless outings from Fernando Abad, Ryan Pressly and Trevor May before manager Paul Molitor handed the ball to Jepsen in the ninth.

“I have to get that third out,” said Jepsen, now 2-4 with a 5.40 ERA. “That’s just the bottom line.”

Down 3-1 in the sixth, Trevor Plouffe blasted a two-run homer to left off Orioles starter Kevin Gausman to tie the score. It was Plouffe’s first home run since April 16, against the Angels’ Jeff Weaver.

The ninth began with Jepsen getting two quick outs before Rickard’s double. That brought the dangerous Manny Machado to the plate. Jepsen’s first two pitches missed the zone, so Machado was intentionally walked.

Jepsen got ahead 1-2 on Jones when he bounced a breaking ball past catcher Kurt Suzuki for a wild pitch. Runners were on second and third, and another wild pitch would score a run.

“My speculation was that there was a little concern that he didn’t have a good feel for his curveball after the wild pitch and they advanced to second and third,” Molitor said. “You bounce another one and you lose a run too, so I think he kept trying to challenge him.”

Jones cranked on a fastball and drove it to left. Jepsen said he thought Arcia was going to catch the ball, but he misjudged it.

“I didn’t realize it was hit down and not up [in the air],” Arcia said, “so when I realized that, I made an attempt to dive for it but it was too late.”

The ball fell in front of Arcia — or he fell in front of the ball — before it deflected off him and toward center fielder Danny Santana. The kick save actually held Jones to a single.

“Machado probably is their hottest hitter. You have to be a little careful there,” Molitor said, “and then we decided to take our shot with a veteran hitter who’s a perennial All-Star and he came through.”

The Twins gave starter Jose Berrios a 1-0 lead in the first inning when Plouffe’s sacrifice fly scored Eduardo Nunez. Baltimore tied the score in the fourth on Matt Wieters’ RBI single.

Berrios kept the score tied until the fifth when Machado hit his 1-0 changeup into the seats in left, then Jones pulverized a hanging curveball an estimated 443 feet to left-center as Baltimore took a 3-1 lead.

Plouffe tied it in the sixth, giving the Twins hope. In the end, the losing continues.

“I don’t want to get into those conversations about long summers and this and that,” Molitor said. “There’s just too much baseball [left]. But somehow, we’ve gotta find a way to do better and win some of these games that we can be competitive in.”