Adam Frazier hit a game-ending homer in the 11th inning, and the Pittsburgh Pirates beat the Chicago Cubs 2-1 on Sunday for a split of their four-game series.

Josh Harrison grounded out and Adeiny Hechavarria struck out before Frazier drove a 3-0 pitch from Brandon Kintzler (1-3) deep to right. It was Frazier's fifth homer of the season.

The Cubs had a prime scoring chance against Richard Rodriguez (3-2) in the top half of the inning, but came up empty. Addison Russell was picked off third by catcher Elias Diaz, and Albert Almora Jr. struck out looking with the bases loaded with two out.

Pittsburgh Pirates starter Jameson Taillon pitches against the Chicago Cubs in the first inning of a baseball game, Sunday, Aug. 19, 2018, in Pittsburgh. (AP PhotoKeith Srakocic)

Pittsburgh Pirates starter Jameson Taillon pitches against the Chicago Cubs in the first inning of a baseball game, Sunday, Aug. 19, 2018, in Pittsburgh. (AP PhotoKeith Srakocic)

NL Central-leading Chicago managed just one run in each game of the series, but took the first two behind strong pitching performances by Jon Lester and Cole Hamels.

Chicago Cubs starter Jose Quintana pitches against the Pittsburgh Pirates in the first inning of a baseball game, Sunday, Aug. 19, 2018, in Pittsburgh. (AP PhotoKeith Srakocic)

Chicago Cubs starter Jose Quintana pitches against the Pittsburgh Pirates in the first inning of a baseball game, Sunday, Aug. 19, 2018, in Pittsburgh. (AP PhotoKeith Srakocic)

Chicago Cubs' Kyle Schwarber,left, is greeted by third base coach Brian Butterfield after hitting a solo home run off Pittsburgh Pirates starting pitcher Jameson Taillon, background center, in the second inning of a baseball game, Sunday, Aug. 19, 2018, in Pittsburgh. (AP PhotoKeith Srakocic)

Chicago Cubs' Kyle Schwarber,left, is greeted by third base coach Brian Butterfield after hitting a solo home run off Pittsburgh Pirates starting pitcher Jameson Taillon, background center, in the second inning of a baseball game, Sunday, Aug. 19, 2018, in Pittsburgh. (AP PhotoKeith Srakocic)