What started as a bad day for the Pirates on Saturday morning looked for a while like it might get much worse.

A few hours after closer Jason Grilli and catcher Russell Martin went on the disabled list, a health issue forced staff ace Francisco Liriano out of the game against the St. Louis Cardinals.

Then things changed for the better.

Liriano was diagnosed with dizziness and flu-like symptoms and is expected to be able to make his next start. That caused sighs of relief in the Pirates clubhouse. After taking hits in the bullpen and behind the plate, losing their Opening Day starter to an injury would have been devastating.

“When they told me Liriano was light-headed, I got light-headed, too,” manager Clint Hurdle said with a laugh.

Better still, the Pirates finally found a little offensive spark and beat the Cardinals, 6-1, to end a four-game losing streak.

“Sometimes storylines get changed,” Hurdle said. “We've taken on a lot in the past 24 hours, but you've got to keep pushing.”

For Liriano, the first inkling of trouble came in the second inning when he got a nosebleed in the dugout.

“I always get nosebleeds,” Liriano said. “I don't know why. I once went to the hospital (years ago), but they didn't find anything wrong. My mom and brothers bleed a lot, too.”

Liriano felt weak and dizzy but insisted he was well enough to keep pitching. Tyler Lyons drew a leadoff walk. After throwing three straight balls to Matt Carpenter, Liriano stepped off the mound and doubled over. He knew he was through.

“A crazy situation,” first baseman Gaby Sanchez said. “But we all pulled together. We know we can't stress.”

Stolmy Pimentel took over and started by throwing ball four to Carpenter. Matt Adams' infield single loaded the bases with two outs, but Pimentel escaped by fooling Yadier Molina with a full-count changeup for a strikeout.

“I was like, ‘Wow, this is a great situation,' '' Pimentel said. “(Molina) is a great hitter. There were (46,254) fans and everybody was loud. You have to stay positive and trust your stuff.”

Pimentel (2-0) worked 22⁄3 innings and gave up a run on two hits.

Four more Pirates relievers combined to allow no runs on one hit over 41⁄3 innings. Relievers have accounted for seven of the team's 10 wins.

“Pimentel pitched as big an inning as we've had pitched for us all year in the third inning,” Hurdle said. “A big-time push from Stolmy today.”

Cardinals left-hander Lyons (0-2) breezed through his first three innings, retiring nine straight batters on a total of 26 pitches. But spending the bottom of the third on the bases — going station to station, standing around during the injury delay — might have broken his rhythm.