ST. PETERSBURG, Fla. -- Just three batters into his outing against the Tampa Bay Rays on Wednesday afternoon, Orioles right-hander Kevin Gausman was already on the brink of disaster.

From his first pitches of the day, Gausman knew the strike zone was getting pinched. And a leadoff walk quickly turned into a bases-loaded jam following a looping single and fielding error by two-time American League Gold Glove shortstop J.J. Hardy.

Facing the possibility of an early exit, Gausman went on to show the Orioles another example of his continuing evolution into a dependable major league starting pitcher.

Gausman escaped a 35-pitch first inning without allowing a run and proceeded to throw six scoreless innings as the Orioles beat the Rays, 2-0, for their sixth shutout win of the season in front of an announced 12,448 at Tropicana Field.

“Obviously, it wasn't what I wanted,” Gausman said. “It's pretty tough to get out of bases loaded and no outs without guys scoring a run. Honestly, I tried to dig deep right there, and I was kind of thinking, ‘OK, I'm going to need my best stuff this inning, whether I blow out later in the game and get tired, this is big. I need to get a zero right here.' That's really all I thought about.”

The win Wednesday gave the Orioles (37-34) a series victory in Tampa Bay, and it was their seventh win in eight games against the Rays this season.

After a day off Thursday, the Orioles will begin a three-game series against the New York Yankees at Yankee Stadium on Friday having won six of their first 10 games in a 13-game stretch against AL East teams.

Left fielder Steve Pearce, batting second for the second straight game, drove in the Orioles' first run with a two-out RBI double in the fifth inning for an unearned run off Rays right-hander Alex Cobb.

Nelson Cruz hit his major league-leading 22nd home run of the season, a solo shot in the eighth inning off reliever Kirby Yates that ended the designated hitter's 14-game home-run drought.

Gausman (3-1), who allowed just five hits and struck out five batters in six innings, provided the Orioles with their 11th quality start in the past 13 games, outmatching Cobb, who held the Orioles to the one unearned run and four hits in seven innings.

It didn't look like that was going to happen after Gausman loaded the bases in the first, but he struck out first baseman James Loney and second baseman Ben Zobrist swinging, both on a devastating split-fingered changeup that dropped off the table, before inducing an inning-ending flyout to escape the jam.

“What are you going to do? Quit?” said Orioles manager Buck Showalter, who won his 1,200th career game Wednesday. “He knows runs are going to be at a premium. A lot of guys, as soon as they get the first out, they get a little bit in swing mode. There are so many borderline pitches, if that. He didn't just get caught up in that. Hats off to him. I don't know if I could have done it. I was getting ready to join the clubhouse guys.”

Gausman has won all three starts and has a 0.95 ERA since joining the Orioles rotation June 7. He has allowed just two earned runs and 14 hits in 19 innings during that span, striking out 14 and walking five.

“[It's his] maturity really,” said catcher Caleb Joseph, who has been paired with Gausman in all three starts. “I saw it in Norfolk when I was catching him. He did such a good job of limiting it when he was there. The game is so fast up here that one pitch can turn the course of the game around immediately. He's just in damage-control mode when runners get on, and once that's over with, he goes back and just attacks the zone. He's matured. His stuff has always been there. Now it's about pitching more than just throwing. And he's definitely pitching for us.”

The Orioles began the season by holding Gausman, one of their most prized pitching prospects, on strict pitch and inning counts, but he threw a career-high 111 pitches Wednesday — the most he has thrown in 39 professional starts. He hadn't thrown 100 pitches in a major league outing before his June 7 start.

“When he's got to reach back for a little extra, it's there,” Showalter said. “Our guys down below and last year have done a good job of making sure he's in good shape physically to pitch, we hope, through October.”

Gausman entered the sixth inning at 92 pitches and holding a 1-0 lead, but he saw that there was no one warming up in the Orioles bullpen to open the inning.

“That was awesome,” Gausman said. “I wanted to go back out there after the sixth. … That's just the type of guy I am. I want to have the ball, and I feel like I can throw 130 pitches if I really needed to. … Obviously, they're probably not going to do that, but that definitely shows a lot of confidence in me.”

Even after Gausman's pitch count crept above triple digits after Evan Longoria ended an eight-pitch at-bat with a leadoff double in the sixth, Showalter allowed Gausman to work through the inning. He received some help when Longoria, thinking there were two outs in the inning, ran on contact on Zobrist's lineout to Pearce in left field, resulting in an inning-ending double play.

“It's awesome, and that's what you want,” Gausman said of being able to throw 111 pitches. “You want a starter who is going to go deep into the game, well, you've got to let him. Sometimes it's going to take 100 pitches and more to get into that seventh inning.”