LOS ANGELES — The Anthony Davis saga is over, and the Lakers have their next superstar big man.

The New Orleans Pelicans agreed Saturday to trade Anthony Davis to the Lakers, according to people with knowledge of the deal. The Lakers sent Lonzo Ball, Brandon Ingram and Josh Hart along with three first-round draft picks, including the No. 4 selection on June 20, to New Orleans to acquire Davis.

As long as the deal is consummated after June 30, the Lakers will have the salary cap space to sign another top-tier free agent to a maximum contract.

Davis’ acquisition comes a year after the Lakers signed LeBron James. At the time, their front office of Magic Johnson and Rob Pelinka said James was the first part of a two-year process to rebuild the Lakers into a championship-caliber team. The Lakers hoped to make progress last season. Hampered by injuries, particularly a five-week absence by James because of a groin injury, they missed the playoffs for the sixth consecutive season.

Davis, 26, requested a trade in January and the Lakers aggressively pursued him before the Feb. 7 trade deadline. Though the Lakers were enthusiastic in trying to make a deal, then Pelicans general manager Dell Demps was less so. Demps refused to work with Pelinka, and while he took then president of basketball operations Johnson’s phone calls, he barely engaged with his offers. Demps was fired later that month. The Pelicans hired former Cleveland general manager David Griffin as their top basketball executive.

Last week, Griffin put together the potential framework for a deal to open negotiations, encouraging interested teams to find a third team that could help New Orleans obtain a talented veteran. The Pelicans had initially hoped they could acquire three of the Lakers’ top young players and the fourth overall draft pick — one they could send to another team for a player. In particular, New Orleans coveted Kyle Kuzma, but the Lakers kept him at the cost of the first-round picks.

Davis is considered a franchise-changing type of player. The 6-foot-10 forward-center was limited to 56 games last season because of injuries and averaged 25.9 points, 12.0 rebounds, 3.9 assists, 2.4 blocked shots and 1.6 steals. Although those statistics are at or above his career averages, his scoring was down more than two points per game from the previous two seasons.

The six-time All-Star has been selected All-NBA first team three times as well as NBA all-defensive first team once and second team twice.

Davis is under contract through the 2020-21 season, although he holds a player option on the final year of his contract. He’s owed $27.1 million next season and $28.7 million in 2020-21 if he exercises his option.

His agent, Rich Paul, told Sports Illustrated in March that Davis would be hitting free agency in 2020 no matter where he goes this summer. A person familiar with Davis’ thinking confirmed in June that 2020 free agency remains in Davis’ plans, effectively making this a one-year audition for the Lakers.