PITTSBURGH -- Marlon Byrd very nearly hit his way out of baseball. Francisco Liriano did his share to pitch the White Sox out of first place.

It's fair to say both are enjoying themselves more this October than they did the last one. The 40,489 maniacs at PNC Park on Sunday were certainly happy to have them involved in the proceedings that have tipped the National League Division Series in the Pirates' favor, 2-1.

Liriano wasn't quite as in control as he has been so often in a season in which he has won 17 games, including Tuesday's win-or-go-home NL Wild Card Game against the Reds, but he refused to crumble. Byrd did much of the heavy lifting in a 5-3 victory by twice delivering important hits on Joe Kelly fastballs and then working a critical walk against Carlos Martinez in the eighth inning.

Who would have thought these two Chicago refugees would be central figures on a team that moved within five wins of the World Series?

"Twelve seasons, first postseason appearance," said the 36-year-old Byrd, who was dumped by the Cubs and Red Sox last season before rebuilding his swing and his self-image in Mexico. "I'm trying to soak it all in and at the same time stay focused. You look at the crowd and you get lost in the energy and atmosphere. Just having a heck of a time. Trying to have fun and get one."

Byrd stopped himself before that sentence had run its course. One what?

A World Series ring, that's what.

We never know who the baseball gods are going to smile on, do we? It would have been easy to dismiss the 29-year-old Liriano after he let down both the Twins and the White Sox in 2012. He was 3-10 with a 5.31 ERA when the Sox dealt for him at the July 31 non-waiver Trade Deadline, hoping he could provide big innings for a rotation missing John Danks.

But Liriano would post an even higher ERA with the White Sox (5.40), struggling to throw strikes and proving to be a rare failure for highly regarded pitching coach Don Cooper, who had been expected to help him find a quick fix, like a NASCAR crew chief working without the benefit of caution flags to slow down the race.

"We were kind of on a full-court press trying to do it," Cooper said. "In the back of my mind, there was a feeling we needed more time."

Cooper compares Liriano to Jose Contreras, who turned into a monster for the White Sox in 2005, which was the season after they had gotten him when the Yankees threw up their hands. Cooper says it was clear that Liriano was "sitting and spinning" on all four of his pitches, but also that he was in a mental funk that caused him to get in his own way. The White Sox would lose five of Liriano's last six starts, watching a three-game lead with 15 games to play go up in smoke.

"We've done some good things with a lot of pitchers, but I look at Liriano as a case when we failed," Cooper said from his home in Nashville, Tenn. "I'm watching him today, seeing how well he's doing, and I'm really happy for him. He's a good kid. He really is."

Liriano, signed to a one-year contract with a 2014 option by Pittsburgh after general manager Neal Huntington and his scouts identified him as a project worth tackling, held the Cardinals to three hits in six innings, the loudest of those being a two-run single by Carlos Beltran. Liriano left with a 3-2 lead that turned into a no-decision when Beltran -- who else? -- hit a long homer off reliever Mark Melancon.

Afterward, Liriano described himself as "very pleased" and "pretty happy" with what he did. The word Cooper used to describe what he saw was "confident." That's a nice trait to have in any walk of life, but it proves absolutely essential in a sport as difficult as baseball, where failures are hugely visible and have a tendency to build on themselves.

Byrd, who had hit a career-high 20 home runs for the Rangers in 2009, batted .210 with a woeful .488 OPS in 153 at-bats between the Cubs and Red Sox last year. He came back to hit .291 with 24 homers and an .847 OPS between the Mets and Bucs, and he looks like a guy who might have more big hits in front of him.

Pirates manager Clint Hurdle has been getting to know Byrd in pressure-packed situations, as Cooper did with Liriano a year ago. But Hurdle said hello to a newcomer who hit 16 homers for Culiacan last winter and another 21 for the Mets, who signed him to a non-guaranteed contract last winter.

"I think if anybody is relishing the opportunity to play in the postseason, it's him," Hurdle said. "He's done a lot of yard work to get here. There's a large volume of work he's put behind him to get this opportunity."

Byrd's career includes a 50-game suspension for a positive PED test on his permanent record. But he has tapped into a chance to write a different ending and is carrying himself with a crazy amount of confidence at a time when it's essential.

That was on display when Byrd pulled a 95-mph fastball from Kelly for a two-run single in the first inning -- making the Cards pay a one-run tax on Pete Kozma's throwing error -- and drove a 93-mph Kelly fastball for a sixth-inning double, setting up Pedro Alvarez's sacrifice fly. But in the words of Pittsburgh second baseman Neil Walker, Byrd's eight-pitch walk against Martinez in the eighth inning was "probably the biggest at-bat in the game."

It was a plate appearance, to be technical. But it was sure a piece of beauty.

The Cardinals had conceded that Byrd can hit a fastball by then, so Martinez threw him sliders for the first six pitches, at 82-84 mph. The seventh was a 100-mph fastball, and Byrd fouled it off. Martinez opted not to try a second fastball, walking him on an 82-mph slider.

"I was trying to sit slider," Byrd said. "Finally felt comfortable when he threw the fastball and fouled it off. I knew I could cover the fastball and still try to look slider. It was one of those [things] where it was close pitches, and it was just missing the plate."

That walk would push pinch-runner Josh Harrison to second base, getting back the base that was lost when Andrew McCutchen was caught trying to make it to third on Justin Morneau's grounder to Kozma, and Alvarez shot a lefty-lefty single to right off reliever Kevin Siegrist. The Bucs led, 4-3, and would extend the lead when Russell Martin singled to score Byrd.

Byrd said he could see the confident way the Pirates played the game when he played against them -- how hard they played, how united they were, how they seemed to be enjoying themselves. He said it all "made sense when I got here."

Byrd has loved every minute of his time with the Pirates. The feeling, obviously, is mutual. He and Liriano have been difference-makers, just as no one knew they would be back in Spring Training.

Phil Rogers is a columnist for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.