BALTIMORE — The Padres scored right away and repeatedly on Friday night, but the Orioles just did better against the wild starting pitcher they faced.

Griffin Canning’s command showed up late and appeared only briefly at Camden Yards, and the Orioles scored three runs in each of the first two innings on their way to a 7-3 victory.

It can’t be said the Padres never had a chance, despite being down 6-2 early.

They stranded runners at second and third base in each of the first two innings and finished another in the third and finished 4-for-14 with runners in scoring position en route to dropping the opener of a nine-game trip.

What can probably be asserted is that it was a miracle both starting pitchers completed five innings.

Between them, Canning and Shane Baz threw 196 pitches before they were relieved at the start of the sixth.

The Orioles just did far more with Canning’s inability to locate many of his 93 offerings.

The seven earned runs Canning allowed were second most he had ever surrendered in 118 career starts.

Four of the five walks he issued and five of the six hits he allowed came in the first two innings.

The Padres took an immediate 1-0 lead, thanks in large part to Orioles third baseman Coby Mayo being unable to handle a routine grounder by Fernando Tatis Jr., who stole second base, went to third on Xander Bogaerts’ infield single dribbled up the first base line and scored on Gavin Sheets’ double.

Canning would throw 10 strikes among his 21 pitches in the bottom of the first. One of the pitches he put over the plate was hit 105 mph on a line and another was his 389 feet to the seats.

Taylor Ward walked to start the Orioles’ half of the inning, went to third on Gunnar Henderson ‘s hard single and scored on a sacrifice fly by Adley Rutschman.

Canning’s best throw of the inning came when he stepped off the rubber and got the ball to Tatis at second base to get Henderson attempting to steal.

But Canning went back to throwing balls to Pete Alonso, who drew a four-pitch walk before Samuel Basallo launched a changeup left in the heart of the strike zone well beyond the wall in right-center field to put the Orioles up 3-1.

Baz’s wildness helped the Padres to a run in the second.

Ty France took a pitch off his elbow guard, and Will Wagner drew a four-pitch walk to start the inning before Freddy Fermin’s fly ball moved France to third. Tatis followed with a single that scored France. Both runners moved up on Jackson Merrill’s groundout before Manny Machado grounded out softly in front of the plate.

Canning began the second by walking Colton Cowser before Tyler O’Neill looped a single into center field, moving Cowser to third. He scored from there on Jackson Holliday’s sacrifice fly.

Canning struck out Ward for the second out before Henderson hit a grounder at 104 mph back up the middle that almost certainly would have resulted in a double play had Canning not slowed it with his glove. Henderson’s infield single was followed by Canning’s fourth walk and a two-run single by Alonso that got just under Machado’s glove and into left field.

Xander Bogaerts walked to start the third inning, and he reached second on Samad Taylor’s one-out single before a strikeout by France and groundout by Wagner made the Padres 2-for-10 with runners in scoring position.

Two half-innings in which no one reached base ensued, and Canning was an out from getting through a second consecutive scoreless inning when he left a sinker up at the thighs and on the inner third of the plate, about where every left-handed hitter with any power seems to love to see pitches. And Henderson, who does have some power, hit his 14th home run of the season to extend the Orioles’ lead to 7-2.

The Padres did succeed in getting Baz to throw a lot of pitches in the first three innings. But he got through the fourth in 12 pitches to bring his total to 86, giving him a chance to finish five.

He did so after Machado’s lead-off double and a one-out single by Sheets got the Padres their third run.

Canning followed a walk of Alonso with a double-play grounder and a strikeout to finish his night.