And so on a warm late-afternoon game Wednesday at Fenway Park, which the Red Sox won, 6-5, over the Athletics, Lester showed why he may be on his way to becoming an elite pitcher.

A pitcher is not going to throw like Sandy Kou­fax every time. But when you can hang in there, give your team a chance to win even when you’re not at your best, or when outside forces are stacked against you, that’s a sign that you’ve arrived.

That’s called being an ace.

There were certainly times during his 5⅔ innings when Lester lost his composure. He had a fit in the dugout after a allowing a three-run homer to Chris Young in the fourth inning, which gave Oakland a 3-0 lead.

He was slamming his glove hard on the bench, and it was the second time in a week I felt concerned for him. The other time was when he was slicing apples with a sharp knife before his start in Cleveland last week. That one turned out OK, too.

Lester was shouting to himself at times, making sure never to direct his anger right at the umpire — and he went through two of them — starting plate umpire Jerry Layne hurt his hand and had to be replaced by second base umpire Mike Estabrook.

“I mean once or twice it’s easy,” Lester said about keeping one’s composure after a close pitch was called a ball. “After a while, it’s frustrating to the point of you have to keep making those pitches. It’s a ball regardless. That’s the biggest thing, is the frustration builds up. One or two or three here or there is one thing, but through the course of a game like that, just continually happening, it’s frustrating because I’m an emotional person. Always have been. And it’s tough to control that sometimes.”

In the past, Lester would have allowed the situation to completely swallow him up. But over his almost six innings, in which he walked six, allowed six hits, and struck out five, Lester was able to hold the A’s at three runs while the Sox rallied to take the lead.

In the sixth, ahead, 6-3, Lester wound up leaving with the bases loaded and two outs, and he threw his glove down the steps of the dugout, incensed with the way the day went. But in relative terms, it went well. He survived it (aided by Junichi Tazawa getting out of the sixth unscathed). It wasn’t a quality start, but it was good enough.

When you leave a game leading, 6-3, against the team that has scored the most runs in the league, you have done something right. On a day when nothing went right, the score didn’t reflect it.

Lester wouldn’t admit to not having his best stuff.

“I wouldn’t say I didn’t have good stuff. I thought I had good stuff,” he said. “Early on [there was] a battle with a lot of foul balls. But yeah, big to get a win right there. Offense picked me up after giving up the three-run homer. We scored three, tied it up, good job to score some more runs,” he said.

Manager John Farrell was impressed by the fact that Lester was able to keep his composure enough to pitch a strong fifth.

“Those are the things that allow you to have a big year, and we’ve got a long way to go,” Farrell said. “I think something kind of clicked after the three-run homer, and when we answered, I thought he settled right in and had one of his best innings of the day in that fifth inning. We were hopeful he could get through sixth, but most importantly Jon has solidified his delivery where he can make adjustments inside the game. And that was the case today.”

Lester’s mind-set was “keep trying to pound the strike zone” despite how seemingly small it was. He tried to take the outside corner, that low pitch, but never got it.

“We didn’t get one of those all day — the outside corner with the backdoor cutter — so we kept trying to get through it,” Lester said. “It was never a strike, so we needed to execute pitches off of that and minimize the damage and I was able to do that.”

Estabrook took over for Layne in the top of the fourth.

“It was like it was the same guy,” Lester said. “I never had that before. Little weird to have to learn a strike zone in middle of the game. I didn’t have to learn anything because it was pretty much the same as before. It’s frustrating for me, but at the same time they’re balls, I’ve got to forget about it and minimize the damage.”

Farrell thought the A’s had an outstanding approach against Lester, which ran up his pitch count.

“They fouled off a lot of balls against him,” Farrell said. “They ran his pitch count up. I think he showed a little frustration with the strike zone in the bottom of it but he made a couple of big pitches and after the three-run homer he righted the ship, put up a zero after we scored the three runs to tie it — to their credit they had a lot of good at-bats and this was a very good series win the way we came out of it today.”

Lester, now off to a 4-0 start for the third time in his career, has limited opponents to three or fewer runs in each of his starts. While one of the first things Farrell told Lester this offseason was to stop snapping at umpires, Lester regressed slightly Wednesday.

“We had some reminders between innings,” Farrell said. “He made some good pitches, and you know what, Jerry’s zone was very liberal at the bottom of it. Got to continue to block that out and execute, and for the most part he did just that.”

You win no brownie points because you didn’t flip your lid. But you win them when, in the face of adversity, you find a way.

Wednesday, Lester found a way to keep his team in the game. It enabled the Red Sox to win another game when their ace was pitching. That means a lot.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.