CHICAGO — Fans around Rate Field rose to their feet as Yoshinobu Yamamoto embraced his teammates before walking off the mound.

Of course, the Dodgers fans stood. But fans clad in Chicago jerseys joined them, waving White Sox hats in the air, acknowledging the brilliance they’d just witnessed.

In the Dodgers’ 7-1 win Saturday, Yamamoto carried a perfect game into the eighth inning until Mookie Betts booted a grounder at short, and a no-hit bid into the ninth before Chicago’s Tristan Peters homered to end it.

Dating to Yamamoto’s previous start, against the Angels, he retired 45 straight batters, one shy of the major league record set by Yusmeiro Petit in 2014.

In an eventful game, which included Shohei Ohtani returning to the lineup to homer in his first at-bat, a two-homer performance from Max Muncy, and a team bounce-back after getting blown out the night before, Yamamoto’s performance on the mound stole the show.

Yamamoto, who exited with one out in the ninth inning and a pitch count of 109, was efficient even within each out. A 10-pitch strikeout in the third inning showed how Yamamoto wasn’t going to give in.

The Dodgers right-hander was one pitch away from striking out Jacob Gonzalez for seven straight pitches. But Gonzalez kept fouling off anything close to the strike zone.

For the 10th pitch of the at-bat, Yamamoto challenged Gonzalez with a cutter over the plate. And finally, Gonzalez swung through it.

The next inning, Yamamoto retired the side on eight pitches.

The only thing that slowed his roll was the mound itself. Yamamoto asked for the grounds crew to fix it in the sixth. And then he kept cruising.

Dodgers catcher Dalton Rushing slaps hands with Dodgers pitcher Yoshinobu Yamamoto.

Dodgers catcher Dalton Rushing slaps hands with Dodgers pitcher Yoshinobu Yamamoto in the ninth inning Saturday against the White Sox.

(Zoe Davis / Getty Images)

He had help from a steady defense behind him for much of the game.

The sixth inning included two highlight-worthy plays. Peters hit a sharp ground ball up the line, and first baseman Freddie Freeman made a sliding stop, tossing the ball to Yamamoto at the bag to get the out. Then left fielder Alex Call ran into the retaining wall in foul territory to catch Edgar Quero’s fly ball for the final out of the inning.

For the most part, Yamamoto made it look easy. The hardest contact against him came the third time through the lineup. In the seventh, he pumped a heater to the top rail against Miguel Vargas, who stayed on top of the pitch to send a line drive to left field — and right to Call.

In the eighth, Yamamoto fell behind Colson Montgomery 3-and-1. But Yamamoto worked back to a full count. Montgomery then scorched a line drive up the first base line — into Freeman’s glove.

Yamamoto’s perfect game ended two batters later, with two outs, on an error.

Yamamoto got Chase Meidroth to chase a slider and hit a ground ball to Betts. But Betts mishandled the hop. The ball shot to his left, where second baseman Santiago Espinal tried to salvage the play but couldn’t pick up the ricochet cleanly.

The no-hitter was next to fall an inning later. Yamamoto piped a fastball down the middle to Peters, who sent it over the wall in right field.

Yamamoto stayed in for one more batter, inducing Quero to fly out, before handing the ball to manager Dave Roberts. Left-hander Alex Vesia took over for the final two outs.

Yamamoto praised his teammates after the game and said, via an interpreter on Dodgers SportsNet, that they made a few key plays that “saved me.”

Asked if he feels closer than ever to his first no-hitter, Yamamoto said: “I feel how difficult baseball the game is, so I keep practicing, working hard and one day I’d like to get that no-hitter.”

Ohtani hits home run in return Dodgers star Shohei Ohtani runs the bases after hitting a home run against the White Sox on Saturday.

Dodgers star Shohei Ohtani runs the bases after hitting a home run against the White Sox on Saturday.

(Matt Marton / Associated Press)

Before Yamamoto took the mound, Ohtani’s return was the big story of the day.

As Ohtani stepped into the batter’s box for the first time, he was greeted by a smattering of boos. He took his first swing at the second pitch of the game. And he sent it into the right-field stands. A no-doubt homer, proclaiming that his availability no longer was in doubt.

Ohtani returned to the Dodgers lineup after exiting at Pittsburgh on Thursday because of inflammation in his left knee.

“Shohei drove it,” Roberts said of the decision to play. “Training staff drove it. We took him out of the game the other night just for precautionary reasons. Yesterday, treated it up. Today he feels great. All the confidence that he can go out there and hit, feel good, not regress at all.”

The Dodgers (45-26) will continue to monitor Ohtani’s knee as he prepares to take the mound Wednesday against the Tampa Bay Rays at Dodger Stadium.

“I think we’re full go,” Roberts said before Ohtani threw on flat ground Saturday. “But I do think once he’s out there playing catch and we see how his knee responds to the pressure, the torque will be some good information.”

Even before Ohtani’s knee swelled — it’s still unclear what caused the inflammation — the Dodgers planned to have him pitch the day before their day off Thursday.

They switched Ohtani and left-hander Justin Wrobleski in the rotation order, with Wrobleski set to pitch Tuesday on regular rest.

That remains the plan, even after Wrobleski was hit in the leg by a comebacker Thursday. He left the game with a bruised right hamstring.

The Dodgers considered bringing in a spot starter, Roberts said, in order to keep the full rotation on extra rest.

“But considering how Wrobo’s start went short, feels good after it, we feel the four days’ rest will be fine for him,” Roberts said. “And then where Shohei is at, we feel good about just leaving it status quo.”

Ohtani returned without restrictions in his designated-hitter role — except for one request from his manager, after a couple of days of parsing whether a steal attempt that was snuffed out by a foul ball had contributed to Ohtani’s injury.

Though they didn’t find a clear inciting incident, Roberts made it clear Saturday: “There will be no base stealing.”