CHICAGO – Losses are mounting and so is the frustration for the Red Sox.

Ryan Dempster pitched four-hit ball over seven innings, and the Chicago Cubs hung on to beat team president Theo Epstein’s former club, topping Boston 3-0 on Friday.

The Red Sox loaded the bases against Carlos Marmol in the ninth, but he got out of it when Dustin Pedroia forced the runner at third, giving the Red Sox their eighth loss in 11 games.

This time, they felt they hit the ball hard enough. They just didn’t find holes.

“You always get frustrated when you have good at-bats and don’t get anything to show for it,” Manager Bobby Valentine said.

Dempster (3-3) continues to pitch as well as ever and could be attractive to a contender if he continues to perform like this.

He stretched his scoreless innings streak to 22 and lowered his ERA to 2.11.

He was at it again after shutting down Milwaukee and Minnesota. This time, he struck out three and walked two while winning his third straight start after going 18 in a row without a victory.

Dempster also helped himself at the plate with two hits. He won a $500 bet with Tony Campana when he came through with his second career triple past a diving right fielder Adrian Gonzalez and scored in the second to make it 3-0 after Steve Clevenger hit a two-run, bases-loaded double off Daisuke Matsuzaka (0-2) in the first.

The bet with Campana? Who would get a triple first this season.

As for the Red Sox?

“Everyone’s trying,” Pedroia said. “We’re not playing good. Today, we didn’t play good.”

In his second start after Tommy John elbow surgery, Matsuzaka gave up three runs and four hits in six innings. He walked three — all in the first — but eventually found his rhythm.

“I did struggle early on, but after that I was able to battle through and pitch,” he said. “I’d say that was a step up from my first start.”

The Red Sox simply didn’t give him much support.

They had runners on second and third against Dempster with two outs in the seventh, but Pedroia lined to right to end the threat.

Things got tense in the ninth against Marmol.

Third baseman Luis Valbuena made a diving stop on Jarrod Saltalamacchia’s hard smash to rob him of a hit leading off. But after Ryan Sweeney singled, he misplayed Mike Aviles’ grounder, putting runners on first and second.

Marmol, back in the closer’s job, then struck out pinch-hitter Daniel Nava but walked Scott Podsednik to load the bases, drawing a visit from Manager Dale Sveum. Marmol fell behind 2-0 to Pedroia before getting him to bounce to third on a 2-2 pitch to end the game, giving Marmol his first save since May 2.

“I thought Dustin was gonna get him,” Valentine said. “I’ll take my chances any time, even though you’d rather not be down three in the ninth any time, but that’s the guy to break him, the ball just hit off the end of the bat.”

Much of the focus before the game centered on Epstein, facing his old team for the first time since he became Chicago’s president of baseball operations.

NOTES: Red Sox RHP Josh Beckett will miss Sunday’s start because of inflammation in his right shoulder. Lefty Franklin Morales will start in his spot.