PITTSBURGH — Matt Joyce took no special joy in helping beat his former team.

Joyce and Gregory Polanco hit home runs during a five-run seventh inning, Jeff Locke got his career-best fourth straight win and the Pittsburgh Pirates held off the Los Angeles Angels 8-7 on Saturday to end a four-game skid.

Joyce struggled mightily in his lone season with the Angels in 2015, hitting .174 with five home runs in 93 games. He surpassed that homer total Saturday by hitting his sixth.

"I really enjoyed my time over there, except for the failing part," Joyce said. "... More for me, the enjoyment today came from coming up in a big spot against a left-hander and having those runs really turn out to mean something to the outcome of the game."

Polanco made it 4-3 by leading off the seventh with a 461-foot drive to right field, his ninth, off Fernando Salas (2-2). Joyce pinch hit for Locke and capped the rally with a three-run shot to centre field off Greg Mahle that made it 8-3.

Joyce has four pinch-hit home runs, tying for second on the Pirates' single-season list with Mark Johnson in 1996. Craig Wilson set the record with seven as a rookie in 2001.

Angels manager Mike Scioscia brought in Mahle, a sidearming lefty, to face the left-handed hitting Joyce.

"It seems like with Greg, it's one pitch that hurts him," Scicosia said. "The home run, it seemed like it just stayed straight down the middle and it didn't have its usual movement on it. Matt Joyce didn't miss it."

Locke (5-3) gave up three runs and seven hits in seven innings. He had two strikeouts and no walks.

"We're throwing more strikes," Locke said. "We're attacking the plate a lot more efficiently. We're still falling behind guys. It's not like we're perfect out there. Now it's a 1-2 pitch instead of a 2-1 pitch. I think it makes a lot of difference."

The Angels scored four runs in the eighth inning, including RBI doubles by Yunel Escobar and Carlos Perez.

Mark Melancon pitched a perfect ninth for his 17th save in 18 opportunities.

"That's what big-time closers do," Pirates manager Clint Hurdle said. "A little madness comes to the game, your closer comes in and goes 1-2-3."

Jung Ho Kang hit a two-run shot and has eight homers in 23 games this season for Pittsburgh. Starling Marte and Josh Harrison each added three hits.

Calhoun homered for the second straight day, his sixth of the season, in the first to open the scoring, and Shane Robinson connected for his first of the season to tie it 3-3 in the sixth.

Escobar had three hits and two RBIs, Calhoun had two hits and two RBIs and Albert Pujols added two hits.

Angels starter Jhoulys Chacin allowed three runs and six hits in five innings while walking four and striking out one. He was moved up a day in the rotation to fill in for right-hander Nick Tropeano, who was placed on the 15-day disabled list with tightness in his right shoulder.

TRAINER'S ROOM

Angels: Tropeano is confident he will be able to return June 14, the first day he is eligible to be activated. ... SS Andrelton Simmons (torn left thumb ligament) could begin a rehab assignment as soon as Monday with high Class A Inland Empire.

Pirates: C Francisco Cervelli (bruised right foot) and INF David Freese (bruised right hand) both sat out a second straight game. ... SS Jordy Mercer (bruised left elbow) returned to the lineup after missing Thursday's game.

BULLPEN MOVES

Angels: RHP Deolis Guerra had his contract purchased from Triple-A Salt Lake. Los Angeles is expected to call up a starter to pitch Tuesday night against the Yankees at New York, though Scioscia ruled out RHP Tim Lincecum as he continues his rehab from hip surgery.

Pirates: LHP Cory Luebke was recalled from Triple-A Indianapolis and the contract of RHP Curtis Partch was selected from the same club. RHP Wilfredo Boscan and RHP Rob Scahill were optioned to Indianapolis. ... RHP Ryan Vogelsong was transferred from the 15-day disabled list to the 60-day DL. Vogelsong sustained facial fractures May 23 when he was hit by a pitch from the Rockies' Jordan Lyles.

UP NEXT

Angels: LHP Hector Santiago (3-3, 4.96 ERA) will start Sunday in the finale of the three-game series. He is 0-1 with an 11.57 ERA in his last three starts.

Pirates: RHP Gerrit Cole (5-4, 2.72) had his three-game winning streak end Tuesday with a loss at Miami.