Cleveland Cavaliers guard J.R. Smith, center, tries to control the ball between Golden State Warriors guard Klay Thompson, top, and forward David Lee during the first half of Game 5 of basketball’s NBA Finals Sunday in Oakland, Calif.

OAKLAND, Calif. — LeBron James soaked his tired feet in an ice bath, had ice wrapped around both knees and his back as he sat smiling in Cleveland’s locker room after a second straight loss in the NBA Finals.

While the Cavaliers’ chances at winning it all are dwindling, James’ confidence is not.

“I feel confident because I’m the best player in the world,” he said. “It’s that simple.”

It just hasn’t been enough for a depleted Cavaliers team against the much deeper Golden State Warriors.

James had 40 points, 14 rebounds and 11 assists in the second highest scoring triple-double in finals history but the Cavaliers lost 104-91 to the Warriors on Sunday night to fall behind 3-2 in the series.

James had more points, rebounds or assists than anybody on either team. He played center, point guard and everywhere in between. The only thing James couldn’t quite do was will the Cleveland Cavaliers to a victory in Game 5 of the NBA Finals.

Despite the stellar night, James said he could still do more, citing a couple of offensive rebounds he allowed, some blown defensive assignments and turnovers.

“I don’t put a ceiling on what I’m capable of doing,” he said. “I know I’m shouldering a lot of the burden, but it is what it is.”

James is now running out of time to find enough help to lead Cleveland to its first major sports title in 51 years. Game 6 will be Tuesday night in Cleveland with the series set to return to Oakland on Friday if a seventh game is needed.

“We’ve got enough to win it,” James said. “We protect home we come here. We’ll worry about Tuesday first. But if we protect home like we’re capable of doing, we force a Game 7.”

With All-Stars Kyrie Irving and Kevin Love and fellow starter Anderson Varejao sidelined by injuries, James has been a one-man band this series. He is averaging 36.6 points, 12.4 rebounds and 8.8 assists through five games. He had 39 points in a triple-double in a Game 2 win and backed that up with another brilliant performance Sunday.

Only Jerry West in 1969 has scored more points in a triple-double in finals history with 42. West was also the only member of a losing team to win finals MVP, a club that James might soon join the way this series is headed.

“LeBron has been tremendous is even an understatement for how he’s played in the series,” coach David Blatt said. “He had another one of those days today. Under the current set of circumstances, that’s what we’ve got to get, and he’s bringing it. You don’t see that every day, what he’s doing.”

James’ night could be summed up in one stretch of the fourth quarter. James gave the Cavs their last lead of the game with a long 3-pointer that made it 80-79 with 7:47 to go.

But MVP Stephen Curry answered with an even longer 3 for the 20th lead change of the game and Klay Thompson followed a miss by James with another 3 that put the Warriors up by five with a lead they would never relinquish.

James got some early help from J.R. Smith, who hit four 3-pointers in the first half before turning cold once again and making no baskets in the final 33 minutes.

“We kept going to him,” James said. “He just missed some shots. He came out aggressive, which we wanted him to do. We kept finding him. He started off well, he just cooled down. It’s just a make or miss league.”

Tristan Thompson provided a lift in the second half but Game 4 star Timofey Mozgov was limited to less than 10 minutes as both teams went to small lineups and no one else stepped up.

Mozgov’s absence helped Golden State win the rebounding battle, including five offensive rebounds in the fourth quarter.

“It’s definitely deflating to our defense,” Thompson said. “They take some tough shots that you don’t see too often, so we’ve got to find our man, box him out.”

At one point, James scored or assisted on 17 straight baskets made by Cleveland in a stretch of 22:35 that started early in the first quarter and went all the way past halftime. Many of those baskets came when James was playing center as both Thompson and Mozgov sat.

Matthew Dellavedova made the only two baskets up to that point that James wasn’t involved in but didn’t hit another all game.