Updated

Dontrelle Willis sure saved his best for last.

Winless in his previous 12 starts this season, Willis (1-6) tossed six solid innings and hit a go-ahead, two-run double in the sixth to lift the Reds to a 5-4 victory over the Pirates.

The veteran hurler, who was salvaged from the scrap heap by the Reds this spring, allowed three runs on three hits. He walked two and fanned six to earn his first victory since June 5, 2010, as a member of the Diamondbacks.

"It was great to get him that first win because it's been a long time coming," said Reds manager Dusty Baker.

Francisco Cordero allowed an RBI double to Neil Walker in the bottom of the ninth, but settled down to record his 35th save of the season.

Pittsburgh starter James McDonald allowed three runs -- one earned -- over five innings. Daniel Moskos (1-1) gave up the decisive double to Willis to suffer the loss.

Chase d'Arnaud had a two-run triple for the Pirates, who fell in their final home contest of the season and were denied a sweep of the three-game series.

The Reds grabbed a 1-0 lead in the first on Joey Votto's RBI single.

An inning later, Juan Francisco led off with a double and Devin Mesoraco reached on Josh Harrison's error, placing runners at the corners. Paul Janish hit a sac fly and Brandon Phillips' two-out, RBI single made it a 3-0 game.

The Pirates tied the game in the home half. d'Arnaud tripled home Derrek Lee and Ryan Ludwick and Michael McKenry followed with a sac fly.

Willis, though, ensured his final start of the season would end in triumph. With runners at second and third, he ripped a Moskos offering off the wall in right for a 5-3 lead.

Sam LeCure and Aroldis Chapman held the Pirates off the board in the seventh and eighth, respectively, before Cordero took the hill in the ninth.

He issued a leadoff walk to Andrew McCutchen, who advanced to second on a wild pitch before Walker's one-out, RBI double. Garrett Jones then went down swinging and Pedro Alvarez flew out to end the game.

"We've learned to battle in close games and that's going to help us down the road," said Walker.

Game Notes

Willis missed his previous start due to back spasms...The Pirates finished 36-45 at home this season...McDonald has lost four of his last five starts...Despite the loss, the Pirates took the season series 10-5.