The Philadelphia 76ers have lost big for three years, when they appeared to value draft picks more than players.

They got a huge victory Tuesday night, and maybe the wins on the court will soon follow.

The 76ers won the NBA draft lottery, giving them the No. 1 selection in June.

"The pain that we've all gone through, the pain of losing is real. You can't camouflage it," said coach Brett Brown, who represented the 76ers on stage. "The city has been incredibly patient, tolerant, choose any word you want. I think this validates some of the pain we went through."

The Los Angeles Lakers finished second but also felt like winners, as they would have dealt their pick to Philadelphia had they fallen out of the top three.

The Boston Celtics, with a pick dealt to them by the Brooklyn Nets, remained in the No. 3 slot.

Nobody moved up in the lottery, which sets the top three picks. The remainder of the 14 teams are slotted in the inverse order of their won-loss record.

The 76ers finished 10-72, just off the worst record in the history of the 82-game schedule, and had a 26.9 percent chance of landing the No. 1 pick (their own 25 percent chance, and Sacramento's 1.9 percent chance, since the 76ers had the right to swap picks with the Kings from a previous trade.)

They would have garnered another top-five selection had the Lakers tumbled a couple of spots, since they would have been entitled to the pick the Lakers originally dealt to Phoenix for Steve Nash that the 76ers later acquired in another trade.

"It's been a long year," Lakers general manager Mitch Kupchak said. "Because of the contingencies of the deal, there was a significant chance we would lose the pick. That would have been disappointing. We would have gotten over it and moved on to the summer, but that would have been disappointing."

Philadelphia certainly won't complain, not after doing no better than No. 3 in the previous two drafts during a three-year process where the focus was more on building for the future than trying to win in the present.

"We can now make the decision all by ourselves," said Brown, who is 47-199 in his three seasons. "We don't have to wait and see what someone else does. It gives us the injection we need."

Their win certainly won't quiet those believers in lottery conspiracies, as former 76ers center Dikembe Mutombo — who works for the NBA as a global ambassador — accidentally tweeted congratulations on their victory about four hours earlier. He sent a subsequent tweet saying he was just excited but was keeping his fingers crossed.

"I want to let people know there was no conspiracy," Mutombo told The Associated Press in a phone interview, saying it was a mistake and that he thought "a lot of people understood the error that was made."

Lottery night was always going to be the highlight of this season for the 76ers, who started it on a freefall that never stopped. They started 0-18, finishing a 28-game skid dating to 2014-15, en route to a 10-72 record that was just a game better than the all-time worst in an 82-game season.

They never attempted to put a competitive team on the court under general manager Sam Hinkie, who resigned in April after overseeing a plan to accumulate draft picks but not wins. They also have the 24th and 26th picks in the first round, and their young players are expected to be joined perhaps next season by Joel Embiid and Dario Saric, who were previously drafted by Hinkie but haven't played in the NBA, with Embiid sidelined by foot injuries and Saric remaining in Europe.

"Trust the process. ... Hopefully the last time we're in the lottery," Embiid tweeted.

The draft is June 23 in New York, with LSU's Ben Simmons and Duke's Brandon Ingram considered the top two picks.

The Lakers will have the No. 2 pick for the second straight year after taking D'Angelo Russell last June. They went 17-65 in Kobe Bryant's final season.

Boston can add another good piece to a team that won 48 games this season, and might not be done getting lottery picks from the Nets. The Celtics can swap picks with the Nets next year, and own their first-round pick in 2018, all as payment for the trade that sent Paul Pierce and Kevin Garnett to Brooklyn in 2013.

"There's a lot more things to be disappointed about on this night," general manager Danny Ainge said. "It could have been worse, it could have been better. It is what it is and we'll move on and do the best we can to build a great team."

Phoenix will pick fourth, followed by Minnesota, New Orleans and Denver. The Suns picked up another lottery pick when Washington fell out of the top 10 to No. 13.