NEW YORK >> After opening the Eastern Conference semifinals with a pair of embarrassing home losses, the Celtics returned to form Saturday at Madison Square Garden.

The defending NBA champions regained both their shooting stroke and their second-half poise in Game 3, routing the New York Knicks 115-93.

Five Celtics players scored in double figures in the win, with Payton Pritchard leading the way with 23 points off the bench on 8-of-16 shooting (5-of-10 from 3-point range). Jayson Tatum flirted with a triple-double (22 points, nine rebounds, seven assists, two steals) and went 5-for-9 from three after scuffling in Games 1 and 2. Jaylen Brown added 19 points, six boards, five assists, one block and one steal.

As a team, the Celtics went 20-for-40 from beyond the arc — a massive improvement over Games 1 and 2, during which they made just 25 of their 100 3-point attempts and posted their two worst field-goal percentages of the season. They also were able to protect a 20-point lead for the first time in the series, leading by 20-plus for the entire second half.

The win in front of a lively New York crowd was on brand for Boston, which finished with the second-best road win in NBA history during the regular season. The Celtics also have not lost three straight games in nearly two full years. They’ll look to even the second-round series Monday night in Game 4.

“If you plan on doing this for a long time, trust me, it’ll be a lot worse than the last 72 hours, and that’s the perspective you have to have,” said Celtics head coach Joe Mazzulla, who blamed his team’s earlier struggles on poor execution more than poor decision-making. “At the end of the day, we have the test in front of us, and I have a group of guys that I wouldn’t want anyone else to be able to go through that. This is the fun part, I didn’t get into the journey for it to be easy. It’s been dark, but in a good way. …

“You’ve got to tap into your darkness, and that’s it. So we’ve got to do it. That’s it.”

The Celtics struggled to finish at the rim in the early going (4-for-9 on first-quarter shots inside the restricted area) but were far more effective on the perimeter than they were in the first two games. They hit each of their first four 3-pointers — by four different players — and six of their first seven, with Derrick White (17 points) turning the lone miss into an easy putback.

Pritchard hit a 25-footer to put the Celtics ahead 32-16, then beat the first-quarter buzzer with an off-balance midrange jumper to make it 36-20. His 23 points were a new postseason career high for the NBA’s Sixth Man of the Year.

The Knicks staged several mini-runs during the second quarter, but Boston’s lead only grew. It hit 19 points on a fast-break layup by Al Horford (15 points, eight rebounds, two blocks) off a Luke Kornet block. Then 22 when Tatum and Pritchard buried threes on consecutive possessions. Then 25 when Brown drove hard to the basket and drew a foul seconds before halftime.

Outside of the early around-the-rim shakiness, it would have been hard to draw up a better first-half response by the Celtics, who built a 71-46 advantage by shooting 54.% from the field, 63.2% from three (12-for-19) and 91.7% from the foul line (11-for-12). Brown accounted for four of those free-throw attempts, and the rest came from Boston’s effective bench, with Pritchard, Kornet and Kristaps Porzingis making all eight of their first-half freebies.

Porzingis, who’s dealt with symptoms from a lingering viral illness that have zapped his energy and limited his availability, came off the bench behind Horford for the second straight game. He played 19 minutes and finished with five points, four rebounds, two assists and three blocks.

Brown, Tatum and Pritchard all hit double figures in the first half, with Tatum going 4-for-5 from three to offset a 1-for-5 start from inside the arc.

“It was really just being more confident and letting it fly,” Pritchard said. “Don’t second-guess a good shot. You come off a ball screen, it’s there, who cares what the outside world is saying? ‘We shoot too many threes’ — everybody’s always saying that. But if you believe in your shot and you’re able to hit it, then take it confidently. So that’s really just the biggest thing.”

The Knicks, meanwhile, went just 2-for-11 from 3-point range and 10-for-17 from the line before halftime, with Mitchell Robinson largely to blame for the latter. The Knicks’ backup center is a valuable defender and offensive rebounder — so much so that Mazzulla intentionally fouled him just to get him off the floor in the fourth quarter of Game 2 — but an almost impossibly bad free-throw shooter.

Robinson missed his first five tries from the charity stripe, including multiple airballs, and drew a roar from the home crowd when he finally made his sixth. The Celtics also hacked Robinson later in the game; he finished 4-for-12 from the line.

Building 20-point leads hasn’t been a problem for the Celtics in this series, however. Holding them has. And the Knicks did threaten as Boston’s offensive production tailed off over the final two quarters.

After the Celtics’ cushion reached 31 points early in the third, New York responded with an 8-0 run, capitalizing on a string of four consecutive Celtics misses. But a third straight monumental comeback never materialized. White halted the Knicks’ rally with a corner three, and Tatum and Horford followed an and-one layup in transition and a fast-break dunk, respectively.

Down 96-70 entering the fourth, the Knicks made another push, draining three 3-pointers in quick succession (more than they made in the first three quarters combined). But that, too, was short-lived. New York never got back within 20, and both teams emptied their benches in the final three minutes.

Mazzulla credited the Celtics’ ability to stiff-arm Knicks rally to their improved play at the end of quarters and their more responsible ball security. He mentioned “live-ball turnovers” several times in his postgame news conference, spotlighting how his team limited the type of plays that often hand the opponent easy baskets in transition. After committing two such giveaways in the opening four minutes, Boston had just four the rest of the way.

“We won the end of quarters, and we didn’t have 11 live-ball turnovers,” Mazzulla said. “I can’t stress to you the importance of not throwing the ball to the other team so they get out in transition. … You have to value the basketball, you have to win the margins. I can’t stress — that’s all we talked about for the last 72 hours, and that’s the most important thing.”

The Celtics, who’ve overcome an 0-2 series deficit just twice in franchise history, now have a chance to send the series back to Boston tied at two games apiece.

“You wouldn’t want to be in any other position as a competitor,” Pritchard said. “This is the best moment you can be in, down 2-0, backs against the wall. You just bring it and I think we’re all prepared for it and we knew the task at hand, so we did a good job today. Now we’ve got to move on and do it again.”