Updated

SAN DIEGO -- Two teams headed in different directions will do likewise after a Thursday matinee.

The Milwaukee Brewers and San Diego Padres are set to cap their four-game series at Petco Park. Afterward, the Brewers go to Chicago to face the World Series champion Cubs. The Padres will hang around while awaiting the visiting Arizona Diamondbacks.

The first-place Brewers (23-18) are trending in the right direction despite being in a rebuilding mode. They are five games above .500 for the first time since 2014, and they have won five of six contests and two of three in San Diego.

The Padres (15-27) are trying to construct for the future as well, but they are scuffling.

While Milwaukee is on top of the National League Central by a half-game over the St. Louis Cardinals, the Padres are already 11 games back of the NL West-leading Colorado Rockies.

The Brewers will try to keep rolling behind starter Zach Davies (4-2, 5.80) on Thursday. The Padres will counter with righty Jarred Cosart (0-1, 3.24).

Davies' season has been of the buckle-up variety. He lost two of his first three outings, spitting out an 8.79 ERA. Then in his past five starts, he went 4-0 with a 4.15 ERA.

Brewers manager Craig Counsell said Davies is still seeking consistency.

"I don't think Zach has locked it in yet this year," he said. "He's been up and down."

To ascend, Davies must corral his fastball.

"Zach is a great commander of the baseball, and it's about Zach getting that fastball back on track," Counsell said. "Throw it and get ahead of hitters."

Instead, Davies, who is 2-0 with a 1.89 ERA lifetime against the Padres, is falling behind and getting on the wrong end of his pitch counts. With the stressful innings come short outings, and that explains why Davies has pitched past the fifth inning in just two of his eight starts.

"He needs to get himself some easier outs," Counsell said. "He is having to really work for every out, and he has longer innings, 20-plus-pitch innings, and that has made his starts pretty short.

"Work ahead and then you get the hitter in swing mode a little more. Then it's just easier to manage the lineup and manage some innings."

Cosart gets the nod for the Padres because Trevor Cahill went on the disabled list Wednesday. Cahill is having shoulder issues, which gives Cosart the chance every pitcher looking for a rotation spot seeks. Cosart last won on Sept. 17, 2015, while pitching for the Miami Marlins.

"It's time for him to rise up and claim something that you really want as a major-leaguer," Padres manager Andy Green said.

Cosart was activated off the disabled list Sunday after he was out since April 19 with a strained hamstring. He made two minor league rehab starts, and he gets another shot after making two starts earlier in the year among his three Padres outings. Over 8 1/3 innings, he has surrendered five runs (three earned) on eight hits and six walks.

It will be his third career start against the Brewers. He lost his only decision but has fashioned a 0.96 ERA.

"You don't get an endless supply of opportunities," Green said. "Sometimes things happen you can't control whatsoever. But where he is with us: Go run with it. We want to see him do great. We believe in what he has in his right arm. We believe in the way he pitches."