BOSTON — Midway through the nightcap of their twin bill against the Red Sox on Saturday, the Orioles were in danger of dropping the doubleheader and losing their hold on first place in the American League East.

But after a 7-4 win over the Red Sox in which the Orioles came from behind to score five unanswered runs and shut down Boston with 5 1/3 strong innings from the bullpen, the music blasted inside the visiting clubhouse at Fenway Park.

Earning a split of their day-night doubleheader was, in a way, a victory. They had lost the series opener earlier Saturday on a walk-off hit after eight innings from right-hander Miguel Gonzalez, and right-hander Ubaldo Jimenez had been chased from Game 2 after just 3 2/3 innings, his second-shortest start as an Oriole.

But these newly minted first-place Orioles proved resilient.

“It's something they've been doing, really for three years,” Orioles manager Buck Showalter said. “It's the grind of the season. You have to earn everything up here. That's why there are no Cinderellas in baseball. We play too many games, and the schedule is crazy at times. It takes a lot of discipline on and off the field to do this.”

Nelson Cruz likely will be voted to start in the All-Star Game for the first time in his career Sunday because of his power numbers. But in the clubhouse after the game, all the talk was about Cruz's unsuccessful attempt to leg out a triple to complete the cycle.

Cruz recorded a career-high five hits in the win and tied Chicago's Jose Abreu for the major league lead with his 27th homer of the season. In his final at-bat, in the eighth, Cruz hit a ball over Daniel Nava's head in right field. The 230-pound Cruz chugged around second, full steam, and slid headfirst into third, but the cutoff throw beat him there.

“As soon as I saw it went over his head, I was like, ‘I got to take a shot [and] see what happens,' “ Cruz said. “I think my angle from first … was bad. So I had to go a long ways to second. I'm happy we won. … Just try, you know? Just try and see what happens. I don't remember the last time I hit a triple. I know I tried one last year and got thrown out at third. That's why I don't try.”

Said Showalter: “If you can't enjoy that and take it the way you need, you're taking yourself way too seriously.”

Trailing 4-3 heading into the sixth inning, the Orioles batted around and plated four runs. Steve Pearce tied the game with an RBI single to center field, the first of three straight run-scoring singles off Boston reliever Burke Badenhop.

Adam Jones and Cruz followed with RBI singles of their own, and the Orioles scored a fourth run on shortstop J.J. Hardy's forceout grounder to third with the bases loaded.

The Orioles (47-40) got home runs from catcher Nick Hundley and Cruz, their seventh multihomer game in the past nine. Hundley hit a two-run shot in the fourth to give the Orioles a 2-0 lead, and Cruz hit a solo blast in the fifth that cleared the Green Monster in left.

Cruz's five-hit night was the Orioles' first in a nine-inning game since Nick Markakis had five July 3, 2011, against the Atlanta Braves. Hardy had five hits in a 17-inning game in Boston on May 6, 2012.

Red Sox shortstop Stephen Drew, who hadn't hit a home run in his previous 66 at-bats and was hitting .136, hit homers in both games, including a two-run shot in the nightcap that fueled a four-run fourth inning against Jimenez.

Jimenez's six walks tied a season high, but his first five didn't lead to any runs, and he didn't allow a hit until the fifth.

The walks “hurt me a lot because every time I got on the mound, I had runners on base,” Jimenez said. “Basically, I beat myself by walking guys. You never put yourself in a good position when you start walking guys.”

The first hit he allowed was Drew's two-run homer to right field, which came after Jimenez issued a leadoff walk to Mike Napoli.

After he struck out Jonny Gomes, four consecutive Red Sox batters had hits, including a run-scoring, two-out double by Brock Holt and Daniel Nava's subsequent RBI single.

Jimenez has struggled mightily against the Red Sox, going 1-4 with a 9.37 ERA in seven career starts. He also has issued five or more walks in five of his past six starts.

Red Sox starter John Lackey recorded 11 strikeouts in 5 1/3 innings and left the game leading 4-3 with two on and one out before Pearce tied the game with his RBI single.