A disappointed Jordan Montgomery stood in the clubhouse at Kauffman Stadium late on the night of May 18 and was resolute.

“I know,” the rookie lefthander said, “I’m better than these outings.”

He had allowed five runs in five innings in that loss to the Royals, falling to 2-3 with a 4.81 ERA and sending social media speculation soaring regarding the security of his rotation spot.

Montgomery has been true to his word, turning in a fourth straight stellar outing Friday night and all but silencing such speculation. Backed by two home runs from Aaron Hicks, Montgomery struck out eight in seven innings — both career highs — in an 8-2 victory over the Orioles in front of a sellout 46,031 at the Stadium.

“You always want to go six-plus,’’ Montgomery said. “As long as I go six, I’m happy.’’

The victory allowed the AL East-leading Yankees (35-23) to match their high-water mark of 12 games over .500 (they were 21-9 on May 8) and remain three games ahead of the second-place Red Sox. The Yankees moved 4 1⁄2 games ahead of the Orioles.

advertisement | advertise on newsday

Hicks, moved to second in the order Wednesday night, snapped a 2-2 tie with a leadoff homer off Dylan Bundy in the sixth inning that landed in The Judge’s Chambers in right. Hicks’ two-out, two-run shot into the second deck in right off Edwin Jackson in the seventh made it 5-2 and gave him 10 homers.

“He continues to shine,’’ Yankees manager Joe Girardi said. “He’s been huge for us.”

Will Hicks continue to start in centerfield once Jacoby Ellsbury returns from his concussion? “He’s going to play a lot, that’s the bottom line,’’ Girardi said. “He’s going to continue to get a ton of at-bats.”

After Hicks’ second homer, Aaron Judge walked and scored on Matt Holliday’s double for a 6-2 lead. Austin Romine’s two-run single off Stefan Crichton in the eighth made it 8-2.

Montgomery, who had a 1.06 ERA in his three previous starts, allowed two runs — a two-run homer by Jonathan Schoop in the second that gave the Orioles a 2-0 lead — five hits and a walk. Schoop hammered a changeup that did nothing except land in the left-centerfield bleachers in a hurry for his 11th homer.

Yankees videos

”They’re a good-hitting team, especially hitting fastballs,’’ Montgomery said. “So you really have to mix, keep them in between speeds. That’s what I was going out there trying to do today.”

The Yankees tied it in the bottom half as Starlin Castro led off with his 10th homer, Gary Sanchez doubled and Chase Headley drove him in with a sacrifice fly.

After Ruben Tejada’s one-out single in the second, Montgomery retired eight straight, a string Tejada broke with a leadoff double in the fifth. Joey Rickard bunted Tejada to third, but Trey Mancini lined to Didi Gregorius and Adam Jones struck out swinging to keep the score tied.

Montgomery, whose slider and curveball were particularly good, retired his final nine batters, making it 17 of 18 retired to end his night.

“He’s got a wipeout curveball, as you can see from most of his strikeouts,’’ Romine said. “But two-seamer down and away, changeup when we needed it, I just think he utilizes all his pitches and he keeps them off balance. You’ve got a kid who goes out there and grinds through some stuff. He’s just a bulldog out there. He attacks the zone, he’s not afraid of hitters. The guy makes pitches when he needs to make pitches.”

advertisement | advertise on newsday

Said Montgomery, “I’m starting to trust my stuff a little more. Just throw it in there and whatever happens happens.”