There hasn't been much to celebrate this season for the New York Mets, but one thing that has been consistent all year is the pitching of R.A. Dickey.

His performance paid off on Thursday, as he became the first knuckleballer since 1980 to win 20 games in a season after the Mets defeated the Pittsburgh Pirates 6-5.

"About the fourth or fifth inning I felt exasperated. I was not myself today for the most part," Dickey said to the Associated Press. "And then I'd come out for an at-bat and I would hear this kind of growing surge, and it really was neat. I mean I don't know if I've ever experienced something like that before. Maybe I never will again. Although I wasn't distracted from the moment, how could you not be motivated to go out there and give the fans and, well, your teammates and yourself all that you have?" he said.

It was the final home game for the Mets this season and Dickey gave the 30,000-plus fans who showed up to Citi Field a reason to celebrate.

"It's like a big exhale," Dickey said.

Dickey pitched 7 2/3 innings and gave up three runs while striking out 13 and only walking two batters. His knuckle ball was fluttering around the strike zone as Dickey tied his career high for strikeouts.

"This was about R.A. today," Mets manager Terry Collins said. "It was about him. It was about his connection with the fans, the connection with the city. And so I said use that."

Dickey has had a long road to success, having started his career as knuckleballer after flaming out as a regular pitcher. He played for a range of teams, including Texas, Seattle and Minnesota, before ending up with the Mets.

"I was the picture of mediocrity by my own admission," he said.

He played in the minors at Triple-A Buffalo in 2010 and worked through a rough season last year when he was only 8-13. He became the first Mets pitcher to win 20 games since Frank Viola and also became the first Mets pitcher to have multiple 13-strikeout games since 1991 when David Cone had three.

"I think everybody here today would have taken one swing where they thought they were going to crush one and they swung right threw it," Pirates outfielder Travis Snider said.

Dickey became the first knuckleballer to win 20 games since Joe Niekro did for Houston in 1980 according to STATS LLC.

Manager Terry Collins gave Dickey the chance to pitch at home in front of the fans by shuffling around his rotation. He threw 128 pitches in the game and received a standing ovation from the Citi Field crowd.

"Growing up, you just want to compete. And once you have the weaponry to compete, you want to be really good," he said. "And then when you're really good, you want to be supernaturally good. And I think for me there's been this steady kind of metamorphosis from just surviving to being a craftsman. Ultimately the hope is to be an artist with what you do."

The win put a cap on an amazing year for Dickey in which he climbed Mount Kilimanjaro and released a book, "Wherever I Wind Up," revealing he was a sexual abuse victim when he was 8.

"When you get to a comfort level about who you are and you don't have secrets and you feel the freedom to be who you feel like you're called to be, that's something," Dickey said. "Is this the result of the cathartic experience of writing the book, I don't know. I'm going to say this, it certainly hasn't hurt. And to be comfortable in your own skin, which I was not for so long in my life, there's something to that."'

Dickey and Washington Nationals starter Gio Gonzalez are the only two pitchers with 20 wins this season. Gonzalez earned his 21st win on Thursday against the Phillies to improve to 21-8. The two stars are the likely front-runners for the NL Cy Young award.

The Pirates took and early 2-0 lead in the second inning, but the Mets quickly cut it to one run after a solo home run from Ike Davis in the bottom of the inning. Rod Barajas put the lead to 3-1 with a home run off Dickey, but the Mets pulled into the lead in the fifth off of singles from Scott Hairston and David Murphy.

The Mets took the lead for good off of David Wright's three run home run, his 21st of the season.

"There were times he picked us up and really carried us as a team on his back," said Wright, happy to provide the hit that made the difference.

Jon Rauch and Bobby Parnell came into the game in relief of Dickey and closed it out. Parnell earned his fifth save of the season.

"I never abandoned hope. I always held that out," he said. "My hope always outweighed my doubt, and that's what kind of kept me going."