Hanley Ramirez has been up and down this season at the plate for the Dodgers. But he carried a very big stick Saturday against the Pittsburgh Pirates in the third of their four-game series.

Ramirez went 4 for 4 with two home runs over the center-field fence and five RBIs to lead Los Angeles to a 12-2 victory over the Pirates before 49,455 at Dodger Stadium.

Ramirez had a run-scoring single in a two-run first inning, another in a four-run third, a two-run home run during a five-run fourth and another home run in the sixth. It was his second multi-home run game of the season, 16th of his career. He tied a career high with the five RBIs; he’s done that five times.

Ramirez, a lifetime .299 hitter, entered the game with a .250 average. He left it batting .265.

The victory snapped a three-game losing streak for the Dodgers (30-27).

In his previous nine games, Ramirez had eight hits in 32 at bats with two home runs and seven RBIs. Saturday he had the same amount of home runs and just two fewer RBIs. He did get two hits in Friday’s loss, however, which may have been a signal he was about to break out in a big way.

He did. But Ramirez at first said he didn’t want to talk after the game. It was hard to tell if he meant it, but he relented.

“Seriously, I don’t know what I’m doing at the plate,” he said, when asked about adjustments. “I just go out there, see the ball, hit the ball. I’ve changed my batting stance through the years many, many times. So whatever works.

“Whatever I feel like that day, where my hands can work, that’s what I do.”

Hyun-Jin Ryu (6-2) picked up the victory by throwing six innings and allowing two runs on 10 hits while striking out four.