What started as a season of promise for the Pittsburgh Pirates is nearing a familiar end.

The Pirates ensured they would finish with a record 20th straight losing season Sunday when they blew a ninth-inning lead in a 4-3 defeat to the Cincinnati Reds.

"Everyone's pretty ticked off about it," Pirates first baseman Garrett Jones said.

Pinch-hitter Xavier Paul led off the ninth with a home run off Joel Hanrahan (5-2) and Zack Cozart had a go-head double for Cincinnati, who clinched home-field advantage in the National League Division Series. The Reds moved into a tie with Washington, which lost to St. Louis, for the best record in the league at 96-63.

The Pirates extended their major North American professional sports record for losing seasons. Pittsburgh was 16 games over .500 on Aug. 6, but has lost 18 of 23 to fall to 77-82.

"I'm disappointed," second-year manager Clint Hurdle said. "One of my goals when I got here was to re-bond this city with this baseball team and to be a group of men who do that collectively. So it's definitely disappointing -- especially when we were able to get to a certain point of the year where we were talking playoffs ... and ultimately it all got away from us."

The Pirates haven't had a winning season since topping the NL East in 1992. Only twice in the 19 seasons in between have they won more than 77 games, and Pittsburgh has three games left to match or surpass the 79 wins the 1997 team had.

19 games under .500

But in none of the previous years since 1992 had the Pirates been so far over .500 or holding a playoff spot for so long. Pittsburgh was in first place from July 3-14 and July 18 but fell to 19 games behind Cincinnati with Sunday's defeat.

"It's unfortunate, where we were halfway through the season and how good we were playing and where we were headed, to have it kind of fall apart," Jones said. "Nobody saw it coming."

Kind of like the events of the ninth inning, one in which two former Pirates played prominent roles.

Paul and Ryan Ludwick were on a last season's Pittsburgh team that was in first place on July 25 but finished the season on a 19-43 slide.

Paul entered the game with four career home runs over parts of four seasons, and Ludwick had only one at-bat in the previous 10 days because of left groin soreness. He was scratched from the lineup due to wet field conditions on a day in which it rained throughout the first four innings.

Paul homered as a pinch hitter to lead off the ninth. With two outs, pinch-hitter Ludwick doubled. Pinch-runner Denis Phipps scored on Cozart's hit.

Pittsburgh still had its chance. Aroldis Chapman walked Jose Tabata to lead off the bottom of the ninth, but Tabata was thrown out at third trying to advance after Chapman's throwing error on a pickoff attempt.

Chapman then walked Clint Barmes and allowed a single to Rod Barajas before striking out Michael McKenry and Starling Marte to end the game and earn his 37th save.

Toronto-born Joey Votto went 2-for-4 with an RBI double for the Reds, who have won four of six.