CLEVELAND (AP) — From being drafted first to dumped four years later, Baker Mayfield’s wild four-year ride in Cleveland is over.

The No. 1 overall pick in 2018, Mayfield was traded Wednesday by the Browns, who moved on from the divisive quarterback months ago and finally sent him to the Carolina Panthers for a future draft pick.

Mayfield, who was pushed out of his starting job amid the Browns’ pursuit of Deshaun Watson, is going to Carolina for a conditional draft pick in 2024 or 2025.

The Browns are also paying $10 million of Mayfield’s $18.8 million contract for next season, a person familiar with the negotiations told The Associated Press. The person spoke to the AP on condition of anonymity because the trade can’t be finalized until Mayfield passes a physical.

However, the trade was announced by the Panthers, who will host the Browns in the coming season’s opener — with Mayfield’s addition spicing up the matchup.

Mayfield’s time with the Browns effectively ended in March when the team traded three first-round selections and six overall to the Houston Texans for Watson, who is facing a possible NFL suspension for violating the league’s personal conduct policy.

Watson has been accused of sexual misconduct by two dozen massage therapists in Texas.

Mayfield, who played most of last season with a left shoulder injury, felt betrayed by Cleveland’s move for Watson, demanded a trade and then had to wait until the Browns found a team both interested in him and willing to take on his salary.

The 27-year-old will compete for Carolina’s starting QB job with Sam Darnold, who was taken two picks after Mayfield in 2018.

The Panthers, who have not made the playoffs since 2017, have been searching for stability at the quarterback position ever since head coach Matt Rhule was hired in 2020. They also took a run at Watson before he chose Cleveland.

Mayfield’s four years with the Browns included fewer memorable moments than distracting ones as he couldn’t end the team’s long search for a franchise QB.

The stint was full of highs and lows, coaching changes, too much drama and not nearly enough wins.

Former Browns general manager John Dorsey was enamored with Mayfield’s talent and swayed by his swagger chose the Heisman Trophy winner from Oklahoma first despite other options, including Josh Allen and Lamar Jackson.

Mayfield began his rookie season as Tyrod Taylor’s backup before coming off the bench in Week 3 and rallying the Browns to their first win in 635 days, a 21-17 victory over the New York Jets on national TV.

Mayfield wound up passing for 3,725 yards and throwing 27 touchdown passes as a rookie, breaking the NFL record for a first-year quarterback. For the first time in years, there was genuine hope for a floundering franchise that has had 32 starting QBs since 1999.

However, Mayfield’s second season was a major setback for both him and the Browns. He threw nearly as many interceptions (21) as touchdowns (22) and seemed to be on a different page of the playbook than star receiver Odell Beckham Jr. Cleveland went 6-10 and fired coach Freddie Kitchens after the finale.

Mayfield also regularly squared off with commentators criticizing his play and sparred with local reporters. His immaturity showed particularly on social media, where he often posted rebukes to his detractors.

The 2020 season signaled a turnaround as Mayfield led the Browns back to relevance with their first postseason appearance since 2003. He thrived in first-year coach Kevin Stefanski’s offense after Beckham suffered a season-ending knee injury, throwing 20 TD passes and just three interceptions in his last 12 games.

Mayfield directed a playoff win — the Browns’ first since 1994 — over the rival Pittsburgh Steelers on Jan. 10, 2021, and came within minutes of getting Cleveland to the AFC Championship a week later before losing at Kansas City.

The resurgence triggered some Super Bowl predictions for the Browns in the 2021-22 season and speculation they would sign Mayfield to a long-term contract.

Neither came close to happening.

After dropping the hyped season opener to the Chiefs, the game’s outcome decided when Mayfield threw a late interception, he suffered a torn left shoulder labrum the following week while trying to make a tackle.

The injury worsened when he was sacked by Houston’s J.J. Watt a few weeks later, and Mayfield never found his rhythm the rest of the season. Beckham forced his way off the roster — his father posted a video of Mayfield missing an open OBJ — and the Browns stumbled to a 8-9 finish and missed the playoffs.

Mayfield sat out the finale and had surgery soon after. Browns general manager Andrew Berry said he expected Mayfield to bounce back as the team’s starter in 2022, but everything changed with the pursuit of Watson.

In recent weeks, as Watson’s legal entanglement dragged on, there had been speculation the Browns could turn to Mayfield. But the quarterback recently said he didn’t think a reconciliation was possible.

They were done with him long ago.