BOSTON — After three blowout games, the N.B.A. finals finally got a nail-biter.
Golden State has won each game it has played after a loss in this year’s playoffs, and did it again in Game 4 of the N.B.A. finals.
On Friday night in front of a hostile crowd in Boston, Golden State evened its series with the Celtics, 2-2, and regained home-court advantage. Golden State won, 107-97, with 43 points from Stephen Curry, 18 from Klay Thompson and 17 from Andrew Wiggins.
As Golden State stretched its lead in the game’s final minutes, Celtics fans began to leave. When Curry was at the free-throw line with 19.1 seconds left in the game, a chant of “M.V.P.” could be heard in the upper deck of the arena.
The series will return to San Francisco for Game 5 on Monday, followed by Game 6 in Boston on Thursday.
The crowd heartily booed Golden State’s players, beginning in their pregame warm-ups.
When Thompson appeared on the court an hour before the game, a group of fans in the lower bowl booed him. He acknowledged them with his arms and encouraged them to get louder. Draymond Green emerged a few minutes later and drew an even louder explosion of boos. Two nights before, Thompson had criticized the crowd for chanting obscenities at Green.
The Celtics entered the game with a 2-1 lead in the series and aspirations of handing Golden State its first back-to-back losses in this year’s playoffs. Before Friday’s game, Golden State had won all five games that followed losses this postseason.
But Boston understood the fierce grip that a 3-1 lead can hold in a best-of-seven series.
“We understand we have a chance to do something special, put some pressure on tonight,” Celtics Coach Ime Udoka said before the game. “You have to come out with the same mind-set, understand it’s a long series, long game, not try to get it all in the first quarter, basically.”
The Celtics gained confidence from the way they had played on Wednesday night.
“We have to replicate what we did in Game 3,” Celtics guard Marcus Smart said. “We reduced our turnovers. We reduced our second-chance points, offensive rebounds. We just controlled the game, the game that we wanted to play.”
Golden State made a change to its starting lineup for the first time this series, replacing Kevon Looney with Otto Porter Jr.
The playoffs this season have been characterized by blowouts, and the Celtics have played in several of them, including all three that came during the finals. Boston won Game 1 by 12 points, lost Game 2 by 19 and won Game 3 by 16.
But early on, Game 4 showed promise that it could be a tightly contested matchup that would stay interesting until the end.
Curry and Boston’s Jayson Tatum each scored 12 points in the first quarter, and Curry screamed at the crowd after hitting one of his two 3-pointers of the quarter.
The frame ended with Tatum passing the ball into the paint to Robert Williams III, who flicked the ball out to Grant Williams in the corner for a 3. Grant Williams’s 3 gave Boston a 28-27 lead heading into the second quarter.
By halftime, the lead had changed hands six times and the score had been tied five times.
It was Celtics guard Jaylen Brown’s turn to shine in the second quarter. He scored 10 points and Boston outscored Golden State by nine points when he was on the court during that quarter.
Boston had stretched its lead slightly by halftime, to 54-49.
But Golden State would not go quietly, especially not with Curry available. He had 33 points heading into the fourth quarter, having scored 14 in the third.
The game was tied at 86 with eight minutes left.
Thompson picked up his fourth foul with 5:33 left in the game and the crowd chanted at him the same obscene chant they had directed at Green in Game 3, but replaced “Draymond” with “Klay.” About one minute later, Thompson’s 3-pointer gave Golden State a 95-94 lead. Boston scored only once in the game’s final five minutes.
There was some doubt after Game 3 that Curry would be available for Game 4 because he hurt his foot in a pileup while fighting for a loose ball. Curry participated in Golden State’s shootaround on Friday morning and was cleared to play.
After Curry’s performance Friday night, the first question posed to Golden State Coach Steve Kerr in the postgame news conference was a cheeky one about how he thought Curry’s foot held up. Kerr laughed.
Thompson also was asked about Curry first when he took the postgame podium.
“The heart on that man is incredible,” Thompson said.