OAKLAND, Calif. -- It's been 40 days since Pittsburgh Pirates left-hander Francisco Liriano won a game. He'll try to end that drought Sunday afternoon against the Oakland A's and impressive rookie pitcher Daniel Mengden.

Liriano had ERAs of 3.38 or lower in each of his past three seasons with Pittsburg and went a combined 35-25. This year, he's 4-8 with a 5.33 ERA, more than a full run higher than his career mark of 4.05.

A mysterious lack of command has been a key to Liariano's struggles. In his previous start, he walked five and lasted only 4 1/3 innings in a 5-4 loss to the Dodgers on Monday. He gave up four hits and five runs (four earned).

More from FoxSports

Over his past six starts, Liriano is 0-5 with a 7.12 ERA with 24 walks in 30 1/3 innings. He's allowed five home runs and 36 hits during that stretch. He hasn't won a game since May 24 against Arizona.

"I've been here before," Liriano said after his loss to the Dodgers. "I've just got to stay positive and keep working."

Liriano went 6-12 with a 5.34 ERA in 2012, pitching for the Twins and White Sox, before signing with the Pirates as a free agent on Feb. 8, 2013. In his first season with Pittsburgh, he went 16-8 with a 3.02 ERA. He walked 63 and struck out 163 in 161 innings.

"I would never have called him a pinpoint pitcher his whole career," Pirates catcher Chris Stewart said Saturday before the Pirates' 4-2, 10-inning victory. "I think this year is a little more out of the zone with certain things, falling behind a lot of hitters and putting guys on base, and it seems like guys are getting big hits against him when they're on base.

"It's just a matter of him going out, trusting his stuff, attacking the strike zone, establishing the fastball command early, and that way he'll get the chases on the other stuff."

Mengden is 1-3 in four starts, but he has a 2.81 ERA and is coming off his first career major league victory. He allowed two hits and four runs over a career-high 7 2/3 innings in an 8-3 victory Monday against the San Francisco Giants at AT&T Park.

Mengden started the season with Double-A Midland, was promoted to Triple-A Nashville then was called up to the A's on June 11. He has 26 strikeouts and nine walks over 25 2/3 innings. With each major league start, his confidence has grown.

"Every time you step on the rubber and get out there you gain experience and confidence and trust in yourself, as well," said Mengden, who will try to prevent the Pirates from sweeping the three-game series. "Getting used to the atmosphere, the type of hitters you're facing. The more and more you do it, the easier it gets, and I guess the more confidence you'll get. And I've been throwing well, so that always helps with the confidence and trusting my stuff. It's a lot of fun."

Mengden scouted the Pirates hitters on Monday in the series opener and again on Tuesday. He knows what to expect when he takes the mound in the series finale.

"They have a lot of balance to their whole lineup," Mengden said. "Speed, power. They're a good team. ... It's always nice seeing a few guys face a team before you face them."