ARLINGTON, Texas (AP) — Marcus Semien had already extended his majors-best hitting streak to 24 games with two hits earlier in the game. His one-out walk in the ninth inning set the Texas Rangers up for their fourth win in a row.

“Marcus, it looks like he’s having a great time. He should be with the type of baseball he’s playing,” Rangers manager Bruce Bochy said. “I enjoy watching him.”

Semien scored the game-winning run on Nathaniel Lowe’s sharp RBI single grounded through the left side of the infield as the AL West-leading Rangers beat the St. Louis Cardinals 4-3 on Monday night.

Corey Seager followed Semien with a single, a popup to shallow left field that third baseman Nolan Arenado chased down but was unable to catch. Lowe then delivered his opposite-field shot off left-hander Génesis Cabrera (1-1).

“I got a pitch that I could do something with, and we’ll take it,” Lowe said.

“Marcus with the big walk. And, you know, Corey didn’t hit it hard, but he hit it in a good place there. And we had another good hitter up (Lowe),” Bochy said. “A hard-fought game, a good character builder. You’ve got a 3-1 lead and they tied it in the eighth. You had to keep battling and they did.”

Rangers closer Will Smith (1-2) worked a scoreless ninth for the victory.

The Cardinals, who have lost four straight, tied the game in the eighth after loading the bases with no outs against rookie reliever Grant Anderson. Some botched baserunning cost them a chance to take the lead after Paul Goldschmidt’s sacrifice fly.

“A tough one,” Cards manager Oliver Marmol said. “Too many mistakes. Made some mistakes on bases that cost us.”

Arenado followed Goldschmidt with a drive to deep left, though the two base runners were close to each other when the ball ricocheted off the wall as left fielder Ezequiel Duran slammed into it before quickly recovering to get the ball.

Nolan Gorman scored the tying run but when Tommy Edman retreated toward third after making the turn, Arenado was sliding into the bag. Edman got tagged out and Arenado slammed his helmet near the plate after Willson Contreras’ inning-ending grounder.

Semien had an RBI single that put Texas 3-1 in the second, when he was the third consecutive batter to drive in a run off Adam Wainwright. The inning began with back-to-back singles by Jonah Heim and Mitch Garver before Duran’s RBI double and an RBI groundout by Leody Taveras.

The 24-game hitting streak for Semien is the longest in the majors this season and the longest in his career. The Rangers’ franchise record is 28, set in 2000 by Gabe Kapler, now the manager of the San Francisco Giants.

St. Louis got an unearned run in the second when Contreras reached on a two-base error after right fielder Adolis Garcia dropped a flyball, stole third and scored on a single by Paul DeJong.