LOS ANGELES — Even when the Cardinals run into each other, they can’t lose.

Yadier Molina and Marcell Ozuna slugged two-run homers and St. Louis overcame a lack of communication in the outfield to beat the Los Angeles Dodgers 5-2 on Tuesday night.

The Cardinals improved to a major league-best 16-4 in August and moved atop the NL wild-card standings by a half-game over Milwaukee.

They also climbed to 2 1/2 games back of the NL Central-leading Cubs.

"We’re cooking on all cylinders right now," winning pitcher Luke Weaver (7-11) said. "We feel very confident about where we’re at. We’re kind of riding the wave right now and just bouncing off each other, keeping that positivity going."

The Cardinals have homered in 14 straight games. They won the opener 5-3 on consecutive ninth-inning homers by Jedd Gyorko and Matt Carpenter. This victory clinched their eighth consecutive series, equaling their longest streak since April 10-May 7, 2015.

Jose Martinez tied it with an RBI single in the third. Molina followed with a two-run shot to right centre to make it 3-1, snapping an 0-for-17 skid and leaving him one hit shy of his 11th straight season with 100 or more.

With two outs in the seventh, Daniel Hudson hit Tyler O’Neill, setting the stage for Ozuna’s two-run homer that extended the Cardinals’ lead to 5-1.

The Dodgers’ runs came in the second when Daniel Poncedeleon hit Yasiel Puig with the bases loaded and in the seventh on Manny Machado’s 29th homer.

The Dodgers have stranded 25 runners in the first two games of the series.

"We should definitely be playing better baseball," Machado said. "Eventually things will turn around. Once we turn that corner, I don’t think anyone is going to hold us back."

For now, though, the Dodgers dropped 3 1/2 games behind the NL West-leading Diamondbacks, the farthest Los Angeles has been out of first place since July 1. The Dodgers fell to 32-32 at home.

"I’m as frustrated as the guys in there are," manager Dave Roberts said. "It doesn’t feel good right now."

In his second major league start, Poncedeleon allowed one run and five hits in four innings. He struck out a career-high eight and walked one pitching not far from his hometown of Anaheim.

Cardinals reliever Carlos Martinez got hit in the chest by a comebacker from Joc Pederson in the eighth. Martinez was knocked down and writhed on the ground as his teammates and a trainer ran to him. He soon got up and walked off under his own power as the inning ended.

Martinez later said he had trouble breathing.

"He was alert, aware," Shildt said. "It was more of his sternum area which made it super scary."

Defensively, the Cardinals had a series of outfield miscues, all of them involving right fielder O’Neill.

He collided with second baseman Kolten Wong as they chased Yasmani Grandal’s single in the second. On the next play, O’Neill dived and badly missed a single by Chris Taylor that loaded the bases for the Dodgers.

"It’s a loud stadium but the reality is we need to be able to communicate better and not have issues where we’re running into each other," Shildt said.

Also in the second, centre fielder Harrison Bader clearly called for a high fly ball hit by Pederson, but O’Neill came charging in with his glove in the air. Bader still managed to make the catch.

In the fifth, Bader caught Justin Turner’s long fly to right centre but came dangerously close to colliding with O’Neill, who had his hands on his hips looking at Bader.

"They’re hungry and aggressive going after the ball. Definitely want that," Shildt said. "They’ll iron it out."

Weaver allowed one run and three hits in 2 1/3 innings of relief.

Bud Norris pitched the ninth for his 26th save.

Hyun-Jin Ryu (3-1) gave up three runs and four hits in four innings, struck out four and walked one.

TRAINER’S ROOM

Cardinals: Activated RHP Carlos Martinez (right shoulder strain) from DL and optioned INF Patrick Wisdom to Triple-A Memphis. … Transferred OF Dexter Fowler to 60-day DL.

Dodgers: RHP JT Chargois went on the DL with nerve irritation. He experienced tingling in his fingers while tossing six pitches in the fifth inning a night earlier. … RHP Ross Stripling will throw a simulated game Friday.

KOLTEN LOOKS GOLDEN

Wong made a stellar play for the first out of the ninth inning. The second baseman laid out in shallow centre field for Turner’s grounder, then pushed his upper body off the ground just long enough to wing the ball to first base before falling back to the outfield grass.

"That’s Gold Glove-caliber," Shildt said.

END OF STREAK

Turner was hitless in five at-bats, ending his major league-leading 14-game hitting streak. During the run, he hit .464 with eight RBIs and three homers.

UP NEXT

LHP Jack Flaherty (7-6, 3.05 ERA) starts the series finale for the Cardinals. Rookie RHP Walker Buehler (6-4, 3.19) goes for the Dodgers.