OKLAHOMA CITY — Russell Westbrook had 40 points and 10 assists, and the Oklahoma City Thunder beat the San Antonio Spurs 105-92 on Tuesday night to tie the Western Conference finals at two games apiece.

It matched the second-highest playoff point total of Westbrook’s career, falling short of the 43 he scored in the 2012 NBA Finals. He also had five rebounds and five steals.

“I think I did all right. Coming out with a win is most important,” Westbrook said in a postgame interview with TNT. “I just try to come out and give maximum effort. My teammates ask that of me, and that’s what I try to do on both ends of the floor.”

Kevin Durant added 31 points on 11-for-22 shooting. It was his highest-scoring game of the series after the NBA’s leading scorer was held to an average of 22.7 points per game in the first three contests. Serge Ibaka added nine points and eight rebounds for the Thunder, who have turned around the series since he returned from an injury that was expected to keep him out for the rest of the postseason.

Boris Diaw had 14 points and 10 rebounds, and Tony Parker added 14 points for the Spurs, who blew a 2-0 lead against the Thunder in this round two years ago, and are in danger of doing it again.

San Antonio will host Game 5 on Thursday.

“We’re just going to have to play better, bottom line,” Parker said. “We didn’t play well here. Now all we can control is Game 5.”

Oklahoma City dominated for the second consecutive game after getting blown out in the first two in San Antonio. The Thunder committed just seven turnovers and shot 49 percent from the field in Game 4.

The Spurs scored the first eight points of the game, but things went downhill from there. A steal and dunk by Westbrook gave the Thunder a 42-32 lead with just under five minutes left in the first half. Back-to-back three-pointers by Durant pushed Oklahoma City’s lead to 50-36.

The Thunder led 58-43 at halftime. Durant scored 22 points, and Westbrook added 17 points, eight assists and four steals before the break.

“I thought the last two games, we played as a group,” Thunder coach Scott Brooks said.

Parker shot 6 of 9 in the first half, but the rest of the Spurs made just 11 of 32 before heading to the locker room.

A lob from Reggie Jackson to Durant for a two-handed slam pushed Oklahoma City’s lead to 60-43 in the third quarter. A steal and jam by Ibaka made it 66-49, and a Westbrook dunk increased it to 76-49.

The Spurs closed the quarter on an 18-7 run to cut the deficit to 83-67. San Antonio’s Matt Bonner made a three-pointer with 3:31 remaining in the game to trim Oklahoma City’s edge to 12, but the Thunder maintained control the rest of the way.