ST. LOUIS (AP) — Initial tests were positive on Carlos Martinez' problematic shoulder. So maybe at least the St. Louis Cardinals had something to smile about.

After lasting just seven pitches in a 4-3 loss to the Milwaukee Brewers Friday night, the 24-year-old right-hander said there wasn't a lot of pain but added he had some weakness. The Cardinals have scheduled an MRI for Saturday.

"I'm not too concerned about it," Martinez said through an interpreter. "But I'm going to wait till tomorrow and see what happens."

Martinez said he first experienced stiffness against the Cubs his last start and that the shoulder was "a little tight" for his bullpen session, but "thought he could push through it."

"But after the first pitch I knew something was bothering me a little bit," he added.

Manager Mike Matheny was somewhat aware of the pitcher's issues but couldn't tell during pregame warmups "because a lot of times he just kind of goes nice and easy."

"I know the fact they came back and ran him through all the tests and weren't overly concerned with what they saw, that's a good thing," the manager added.

Khris Davis homered off Trevor Rosenthal leading off the ninth inning for Milwaukee, atoning for a base-running gaffe earlier. Davis thought there were two outs instead of one when he kept running on a routine fly ball and was easily doubled off second in the fourth.

"I completely blanked out," Davis said. "I can't afford to make those mistakes."

Coming through in the ninth said, made it that much sweeter.

"Yeah, you can write that," Davis said.

The loss cut the Cardinals' NL Central lead to three games over Pittsburgh with eight games remaining.

Rosenthal (2-3) was St. Louis' eighth reliever and Davis' 24th homer was just the second allowed by the St. Louis closer; the other was by Pittsburgh's Jung Ho Kang on May 3 in St. Louis.

Davis was 1 for 5 with four strikeouts against Rosenthal before lining a 1-1 fastball into the right-field bullpen.

"I don't know the numbers, but I know he's got great stuff," Davis said. "I was just looking to get on base."

Will Smith (7-2) got the Brewers out of danger in the eighth and Francisco Rodriguez earned his 36th save in 38 chances.

Milwaukee has lost 12 of 17 against the Cardinals this season and 53 of the last 77 meetings.

Martinez flinched after a called first strike to Adam Lind, then left the field with his glove covering his face and in apparent pain. Martinez is among the NL leaders in wins (14) and ERA (3.01).

Lefty Tyler Lyons replaced Martinez and had five strikeouts in a row in the second and third.

"You just get thrown right in the fire," Lyons said. "You've got to make pitches off the bat."

Jean Segura scored from second to tie it at 3 in the seventh when rookie second baseman Greg Garcia couldn't get the ball out of his glove on a two-out grounder by pinch-hitter Domingo Santana.

"That play hurts," Garcia said. "It's a big game."

Jonathan Lucroy had a pinch-hit RBI single in the sixth and Jordan Schafer doubled twice. Starter Ariel Pena allowed three runs in five innings.

The Cardinals got RBIs from Matt Carpenter, Stephen Piscotty and Tony Cruz.

FULL HOUSE

The attendance of 45,057 was the Cardinals' 35th sellout with two dates remaining.

COOLING OFF PERIOD

Cardinals rookie Tommy Pham, who entered with a major league-best .412 average including three homers since Sept. 15, struck out in all four at-bats. ... Pinch-runner Peter Bourjos was caught stealing for eighth time in 13 attempts in the eighth.

TRAINER'S ROOM

Brewers: Ryan Braun (lower back) missed his sixth consecutive start but lined out as a pinch hitter to end the eighth. ... Lucroy, coming off a concussion, has a pinch-hit single the last two games and finished at first base.

Cardinals: RHP Adam Wainwright is scheduled for a second simulated game Saturday. The two-time 20-game winner is attempting to come back just five months after tearing his left Achilles.

UP NEXT

Lefty Jaime Garcia (9-5, 2.45) is 6-1 with a 2.83 ERA in 10 starts since Aug. 1 and the Cardinals are 9-1. Tyler Wagner (0-0, 12.27) makes his second career start for the Brewers.