CLEVELAND (AP) — 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 paying $10.5 million of Mayfield’s $18.8 million contract for next season, two people familiar with the negotiations told The Associated Press. The Panthers will pay $4.8 million and Mayfield will take a $3.5 million pay cut, said the people, who spoke to the AP on condition of anonymity because the trade can't be finalized until Mayfield passes a physical.

Mayfield can earn back some of the money through incentives. Also, if he plays 70% of Carolina's snaps next season, the pick the Browns are receiving will be a fourth-rounder in 2024.

The trade was announced by both the Browns and Panthers, who coincidentally will meet in next season's opener in Charlotte, a matchup spiced up by Mayfield switching teams.

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. The league's disciplinary officer is expected to rule on Watson before the Browns open training camp later this month.

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.

Browns owners Dee and Jimmy Haslam thanked Mayfield for his contributions.

“From the moment he was drafted, he gave his all for this organization and this city,” they said. “With his fierce competitive spirit, he excited the fanbase and accomplished things that no player at his position had done in Cleveland for a very long time. He also made a difference in the community, whether it was hosting events at the Boys and Girls Club, honoring our troops, supporting the Special Olympics as well as countless other charitable endeavors.”

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, choosing 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. 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.

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 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, 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 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 Arizona'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 and the Browns stumbled to a 8-9 finish and missed the playoffs.

Mayfield also raised eyebrows by publicly questioning Stefanski's play-calling.

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.