got in some jams and was able to pitch out of it, which was really nice to see,” Cubs catcher David Ross said. “He’s done that a couple times here lately.”

Rizzo doubled and scored on Javier Baez’s fifth-inning double and hit his ninth home run of the season in the seventh off Ryan Vogelsong. Rizzo had 3 hits, scored 3 runs and finished the series with 5 doubles and the home run.

Baez also had 3 of the Cubs’ 12 hits and drove in the game’s final run with an RBI forceout in the ninth. Addison Russell added 2 hits, and Kris Bryant extended his hitting streak to 10 games.

Pinch hitter Matt Joyce had a 2-run homer in the seventh against Adam Warren. Three of Joyce’s 4 home runs have come as a pinch hitter.

Juan Nicasio (3-3), who had won his first 3 home starts after being signed as a free agent, allowed 4 runs (1 earned), 8 hits and 3 walks in 4? innings.

Pittsburgh got 2 hits each from McCutchen, David Freese and Josh Harrison. McCutchen had gone 2-for-19 in his previous five games.

“We had our chances but we didn’t capitalize on them,” Harrison said. “It’s disappointing to get swept, but we’re good about getting past things. We came in, took a shower and now we’re moving on.”

• Rizzo is hitting .362 (17-for-47) with 16 RBI in his last 12 games after hitting .163 in his first 14. He also is batting .442 (23-for-52) in his last 13 regular-season games at Pittsburgh with 9 doubles and 9 RBI.

“Part of it is just that he had to have better luck,” Maddon said. “I saw (his batting average on) batted balls in play was just atrociously low, and that just comes back to you.”

• Cubs right-fielder Jason Heyward (sore right wrist) did not start for a third straight game, but Maddon is optimistic he might play tonight when the Cubs open a four-game series against the Washington Nationals at Wrigley Field.

Pirates catcher Elias Diaz underwent surgery Tuesday to debride his right elbow, and the rookie is expected to be out until mid-July.

• Right-hander Kyle Hendricks (1-2, 3.52 ERA) pitching on eight days’ rest tonight when he pitches against Washington right-hander Joe Ross (3-0, 0.79).

After an off-day, Pittsburgh starts a three-game series Friday night at St. Louis with Francisco Liriano (2-1, 3.86) facing Carlos Martinez (4-1, 2.60).

Liriano is 6-2 against the Cardinals in 13 starts.