In a season defined by baseballs flying out of the park, the Baltimore Orioles have been on the wrong end of the equation more times than any team in major league history.

For a welcome change, the Orioles on Wednesday night contributed to a long ball record with one of their own. The milestone homer, a three-run drive in the seventh inning by Jonathan Villar, carried Baltimore past the Los Angeles Dodgers 7-3.

Villar’s drive off Caleb Ferguson (1-2) was the 6,106th in the majors this season, breaking the previous mark of 6,105 in 2017. Villar sent a fastball deep into the left-field seats to break a 2-2 deadlock and help the Orioles snap a six-game skid.

“Somebody told me after the homer [about the record]. That’s unbelievable,” Villar said. “They put the bat in the Hall of Fame. I’m excited for that.”

The Orioles have yielded a major league record 280 homers this season, but on this night they hit the two that mattered most: Villar’s and a two-run drive by Pedro Severino in the eighth.

“The home runs are up everywhere and it’s tough to keep the ball in the ballpark,” Orioles manager Brandon Hyde said. “I’ve seen enough home runs here from the other side, so it’s nice to get one from our side.”

Having clinched the National League West title on Tuesday night before indulging in a boozy celebration, the Dodgers did not appear to play with their usual intensity.

“I imagine there may not be a winning record for teams [the day] after they clinch, but definitely not an excuse that we’ll use,” said starter Ross Stripling, who toiled for only three innings before getting the rest of the night off.

Manager Dave Roberts rested starters Joc Pederson and Justin Turner.

A first-inning double by David Freese was Los Angeles’ only hit off John Means through the fifth, and the Dodgers finished with six hits — the most notable a two-run shot by A.J. Pollock that made it 2-1 in the sixth.

“I thought we were ready,” Roberts said. “You have to give credit to the guy over there who made pitches.”

Roberts used seven pitchers.

“I thought up until that seventh inning, we threw the ball really well,” he said.

The Baltimore seventh began with a walk and Austin Hays’ third hit of the game preceded Villar’s career-high 21st home run.

“Huge hit for us,” Hyde said.

The victory was Baltimore’s 47th of the season, matching their total from last year. The Orioles remain two defeats away from their second straight 100-loss season.

Shawn Armstrong (1-1) followed Means with 1-2/3 innings of one-hit relief to earn his second career victory in 100 appearances.

In other results, it was:

‧ Padres 4, Cubs 0

‧ Red Sox 0

‧ Brewers 7, Marlins 5

‧ Mets 9, Diamondbacks 0

‧ Braves 3, Phillies 1

‧ Nationals 6, Twins 2

‧ Athletics 5, Astros 3

‧ Royals 8, White Sox 6

‧ Rockies 2, Cardinals 1

‧ Indians 4, Angels 3

‧ Rangers 10, Rays 9

‧ Pirates 6, Giants 3

‧ Mariners 5, Reds 3