Everything was back to normal Monday night with Yu Darvish on the mound for the Texas Rangers.

The right-hander pitched well enough to win, allowing only one run before leg cramps knocked him out of his start after seven innings.

But, as has often been the case this season in a Darvish start, the offense couldn’t provide him with much support.

And, as has often been the case the past two weeks, the Rangers’ division-title hopes are cramping, too.

Pittsburgh rookie Gerrit Cole allowed only three hits in seven scoreless innings, and back-to-back two-out doubles off Darvish in the seventh produced the game’s only run as the Pirates opened a three-game series with a 1-0 victory.

Pittsburgh also guaranteed its first winning season since 1992 with win No. 82 on the season.

The loss was the Rangers’ third 1-0 defeat with Darvish on the mound and cost the Rangers another half-game to first-place Oakland in the American League West standings. The Rangers now trail by two games, and their wild-card lead over Tampa Bay is 2 1/2 games.

The good news after the Rangers’ fourth loss in their past five games is that Darvish looked sharp, pitched efficiently and is expected to make his next start Saturday in the second game of a critical three-game series against the A’s.

“It was precautionary,” manager Ron Washington said. “We needed him to step up, and he stepped up. He did a great job. Just one pitch. That was the only opportunity they had, and they took advantage of it.”

Former Rangers outfielder Marlon Byrd kept the seventh inning alive with a two-out double to left field, and third baseman Pedro Alvarez was down in the count 1-2 before taking a slider low and fouling off another.

Darvish (12-8) went with a fastball on the next pitch, and Alvarez lined it to center field for a double to push home Byrd. Darvish said that the cramping in his right leg wasn’t an issue during the inning.

He had cramped during the seventh inning Aug. 24 at Chicago but said this episode came after the inning while he was in the dugout.

“I didn’t really cramp up like last time,” Darvish said. “I didn’t have any nutritional issues like last time. It’s not serious at all.”

Ian Kinsler cut down Andrew McCutchen at home in the ninth to keep the Rangers’ deficit at 1-0, and the slumping Adrian Beltre singled with two outs in the bottom half to bring the winning run to the plate.

A.J. Pierzynski, though, grounded out on the first pitch from Mark Melancon, and the Rangers finished with only four hits.

“We’re still putting together at-bats, still doing the same stuff trying to put pressure on the other team,” Pierzynski said. “But when you look up and only have three or four hits, it looks like you’re not trying or putting in the work, but these guys are putting in the work. Sometimes it just doesn’t work out.”

The Rangers’ best chance against Cole came in the sixth. Elvis Andrus and Alex Rios drew two-out walks and were at second and third after a double steal on the first pitch to Beltre.

But the third baseman, who has carried the Rangers’ offense much of the past two months, bounced to shortstop on the next pitch.

“He’s just not squaring it up the way he was,” Washington said.

Cole, the No. 1 overall pick in the 2011 draft, struck out a career-high nine. Andrus said that the right-hander, who touched 99 mph on the inning-ending pitch to Beltre in the sixth, did whatever he wanted on the mound.

“He painted everything,” Andrus said. “He kept the ball right at the knees and had great breaking stuff. We had an opportunity with Adrian up, but [Cole] was really good.”

So was Darvish, who worked to catcher Geovany Soto instead of Pierzynski. Darvish threw only 81 pitches and allowed just four hits after telling himself to challenge the Pirates and let them put the ball in play.

Aside from consecutive two-out doubles in the seventh, the approach worked and allowed Darvish to bounce back after issuing five runs in five-plus innings Wednesday.

Once again, though, the offense couldn’t lend him any support.

“It’s baseball,” Darvish said. “Sometimes the offense can’t score a run. Sometimes the offense can score 20 runs. Tonight the hitters did their best, and I did my best.”