MIAMI -- Jimmy Butler took the last free throw of the night, then bent his knees a bit and almost seemed unsure what would happen as the ball made its way to the rim.
Turns out, it was perfect -- and so were the Miami Heat on Tuesday night.
They set an NBA record by making all 40 of their free throws, the last of those coming on Butler's three-point play with 12.9 seconds left, and rallied in the final moments to beat the Oklahoma City Thunder 112-111.
Miami topped the 39-for-39 effort by Utah against Portland on Dec. 7, 1982.
"It's just a normal Tuesday night for the Miami Heat," coach Erik Spoelstra said. "I think this is when we feel most alive, when everything just happens and when all of our competitive juices get out there. That's the team we all can relate to. That's the team I like."
Just some of what happened Tuesday: The Heat played without six injured players, including four starters; backup Heat center Dewayne Dedmon was ejected after arguing with his own team and smacking a massage gun onto the court during play from the sideline; Miami had a six-point possession in the fourth quarter; and Josh Giddey had a triple-double for the Thunder.
Oh, and the record from the line.
"Credit them, first of all, for that," Thunder coach Mark Daigneault said. "That's impressive."
Butler scored 35 points and was 23-for-23 from the line, tying the second-most makes without a miss in NBA history. James Harden made 24 without a miss for Houston on Dec. 3, 2019, and Dirk Nowitzki made 24 without a miss for Dallas in a playoff game against the Thunder on May 17, 2011. Dominique Wilkins also went 23-for-23 in a game in 1992.
"We won," Butler said. "Complete team effort. I'm proud of my guys."
Max Strus scored 22 points, and Victor Oladipo had 19 for Miami. The Heat were without four regular starters -- Tyler Herro, Bam Adebayo, Kyle Lowry and Caleb Martin -- because of injuries.
Shai Gilgeous-Alexander scored 26 points for the Thunder. Giddey finished with 18 points, 15 rebounds and 10 assists, getting the triple-double on an assist setting up Aaron Wiggins' dunk for a 111-106 lead with 1:28 left.
Miami scored the final six points.
"Whatever it takes to win," Butler said.
Miami led 89-88 going into the fourth, and with Butler on the bench after he had played the entire third quarter, the Thunder took advantage. They scored the first six points of the final period, taking their first lead of larger than three points when Tre Mann connected on a jumper with 9:20 left to go up 94-89.
But a six-point possession gave Miami the lead back. Oladipo made a steal, and Thunder center Eugene Omoruyi was called for a clear-path foul. Oladipo made both free throws, and on the continued Miami possession, Gabe Vincent made a 3-pointer while getting fouled by Mann. Vincent made the free throw, and just like that, a 96-91 deficit was a 97-96 lead.
"We always talk about finding a way to win. ... This is a good start to that," Butler said.