SEATTLE — John Farrell figured this might happen.

A victory? Sure, the Red Sox were bound to win again sooner or later, even if they had to hang on for dear life in a one-run nailbiter against the upstart Mariners.

But for days leading up to Wednesday night’s series finale, the Sox manager had eagerly awaited the return of Clay Buchholz, expecting to see a much more effective version of the slender right-hander than the lost soul who went on the disabled list last month with a hyperextended knee and shattered confidence.

“He’s in a good place, feels good where he’s at delivery-wise, physically he’s ready to go,” Farrell had said Tuesday. “A healthy and productive Clay Buchholz is never a bad thing.”

It was on Farrell’s cue, then, that Buchholz took the mound and delivered 7 1/3 largely effective innings in Boston’s sweep-averting 5-4 win, doing as much to propel them back across the country as the jet plane they boarded for a red-eye flight to New York and a three-game series this weekend against the Yankees.

“Confidence comes from results, and the one result everybody’s looking for as a starting pitcher is keeping your team in the game and getting the ‘W’,” Buchholz said. “It’s a step in the right direction.”

Buchholz gave up three home runs, including a solo shot to .208-hitting Brad Miller that cut the lead to one run in the eighth. And if you were looking for a sign that he’s back to his All-Star form, that wasn’t it.

But considering how bad Buchholz was during the season’s first two months – his 7.02 ERA ranked last among all pitchers who had thrown at least 40 innings – there was plenty of progress in the fact that he pitched into the eighth inning for the first time in 13 months, rediscovered the signature changeup that had gone missing in April and May, and exhibited better mechanics that allowed him to throw 55 of his 76 pitches for strikes.

“He was outstanding,” Farrell said. “He pitched comfortably, he was extremely efficient, he really gave us a lift in that starting rotation. And what he could mean to us going forward is not only a boost but the potential for a well-above-average performance.”

Indeed, for the first time in a while, Buchholz resembled a trustworthy starter.

Well, at least after the second inning, when Buchholz gave up three runs on a solo shot by Kyle Seager and Mike Zunino’s two-run blast off the left-field scoreboard.

But just when it looked like the month-long mental break hadn’t done Buchholz a bit of good, he set down 11 of the next 12 batters.

What was it that allowed Buchholz to regroup so effectively? Start with this: He had a better change-up and curveball, giving him a more diverse repertoire with which to attack the Mariners.

“Early in the season I was basically using two pitches – fastball and cutter,” Buchholz said. “If you’re not on point with them as far as command and location of them, they’re going to get hit. Obviously I wasn’t. Whenever I can go to the change-up or curveball, cutter, first pitch of the at-bat and let them know I’m going to throw all of my pitches at them, it’s got to be a little bit tougher to hit rather than sitting on one or two.”

But Farrell also believes Buchholz benefited from not overthinking things on the mound.

“I think there wasn’t a whole lot of thought going on out there,” Farrell said. “He was in the flow of the game. There was a good feel for all four pitches he was throwing, no hesitation on his part. That’s a sign of confidence and a good frame of mind on the mound with that tempo.”

Buchholz got outs with his breaking pitches, touched 94 mph with his fastball, and was in greater command of the game than at any point this season.

Buchholz faced 27 batters and threw 19 first-pitch strikes, which meant he worked ahead in the count enough to dictate at-bats instead of giving away the advantage to the hitters.

“Look,” catcher A.J. Pierzynski said, “if Clay’s right, he’s going to be great for us. He’s a guy that’s won a lot of games at this level. If he didn’t get hurt last year, he probably would have won the Cy Young. He’s got all the ability. He worked fast tonight. He got the ball and he threw it. He was aggressive, and that’s what we want to see out of him.”

Said Buchholz: “It’s good to be back.”

The Red Sox couldn’t agree more.