PORTLAND, Ore. — LeBron James’ debut for the Lakers opened with two thunderous dunks and closed with a loss.

He finished with 26 points and 12 rebounds, but the Trail Blazers prevailed 128-119 Thursday night in the season opener for both teams.

James insisted the new-look Lakers were going to be a work in progress.

“It’s not instant oatmeal. It’s not that fast,” James said. “It takes some time to get that chemistry where you can just close your eyes and know exactly where guys are.”

Damian Lillard had 28 points and Nik Stauskas came off the bench to score 24 for Portland, which won its 18th straight home opener to extend an NBA record. It was the Blazers’ 16th straight victory over the Lakers.

The opening festivities were tempered by the death this week of Trail Blazers owner Paul Allen. A “Rip City” baseball cap rested in Allen’s courtside seat with a single rose.

The enigmatic co-founder of Microsoft died Monday in Seattle from complications of non-Hodgkin’s lymphoma. He was 65. There was moment of silence before the game and tributes to Allen throughout the night.

On the court, the focus was all on James. His monster dunks to start stunned the Moda Center crowd while Nike co-founder Phil Knight looked on from courtside seats.

James signed a four-year, $153 million deal with the Lakers as a free agent in the offseason after winning three NBA championship rings and taking his team — Miami and Cleveland — to the NBA Finals for each of the last eight seasons.

The four-time league MVP joined a revamped group that includes veterans Rajon Rondo, JaVale McGee, Lance Stephenson and Michael Beasley, as well as a young core of Brandon Ingram, Lonzo Ball, Kyle Kuzma, Josh Hart and rookie Moe Wagner.

While the Lakers made big changes in the offseason, the Trail Blazers returned all five starters from a team that finished third in the Western Conference last season — including the nucleus of Lillard, CJ McCollum and Jusuf Nurkic.

“We wanted to come out and start the season right and to honor our owner, Mr. Paul Allen. That’s what tonight was all about for us, not about the noise surrounding the game,” Lillard said.

James’ putback gave Los Angeles a 25-15 lead. He played just under nine minutes in the opening quarter and led all scorers with 13 points.

Portland pulled in front 46-40 on Stauskas’ 3-pointer. Stauskas, who signed with the Blazers as a free agent this past summer, led all Blazers with 16 points in the opening half. Portland pushed the lead to 11 but led just 65-63 at the break.

“He really got in a groove and the guy can shoot, we’ve seen it in practice,” coach Terry Stotts said about Stauskas. “I was really happy for him to start the season like that with a new team. The shots that he made were all in the flow of the offense.”

James had 18 points but collected a third foul with 6:04 left in the half.

Kuzma’s dunk got the Lakers within 79-78 with just more than four minutes left in the third quarter. Hart’s 3-pointer — the Lakers’ first of the game — put Los Angeles up 85-83. The lead was short-lived, but Portland had just a 93-91 advantage going into the final quarter.

Stauskas hit a 3-pointer that put Portland up 107-100 with 7:22 left. After it fell, he turned to the crowd and pounded his chest. McCollum’s 3-pointer with 5:01 left put Portland up 114-104.

Caldwell-Pope’s 3-pointer with 30.7 seconds left got the Lakers within 124-118, but Stauskas made a pair of free throws and Los Angeles couldn’t catch up.