Wide receiver Odell Beckham Jr. is leaving New York. (Jonathan Newton/The Washington Post)

In a blockbuster trade that alters the course of two NFL franchises, the New York Giants agreed to send standout wide receiver Odell Beckham Jr. to the Cleveland Browns, two people familiar with the deliberations said Tuesday night.

The Browns are expected to send first- and third-round picks in the upcoming draft and safety Jabrill Peppers to the Giants for Beckham, one of the NFL’s most dynamic players. The trade can become official Wednesday, when the new league year begins.

Beckham becomes the second star NFL wide receiver traded in recent days. The Pittsburgh Steelers agreed over the weekend to send Antonio Brown to the Oakland Raiders for third- and fifth-round draft choices.

The Giants will receive considerably more for Beckham. They get Peppers, considered by some a star in the making and a potential replacement for Landon Collins, who is leaving the Giants via free agency after agreeing to a six-year, $84 million contract with the Washington Redskins. And they receive the draft’s No. 17 selection, plus a third-round choice that the Browns had gotten from the New England Patriots in the trade that sent defensive tackle Danny Shelton to New England.

Still, many in and around the league were wondering why the Giants would part with a player as supremely gifted as Beckham, a three-time Pro Bowl selection at 26. Beckham made spectacular catches seem routine and has been highly productive, with 390 catches for 5,476 yards and 44 touchdowns over five seasons.

“At this point, I have no idea what to think,” Beckham told NFL Network on Tuesday night. “I’m trying to process it right now.”

Beckham told the league’s TV channel that he had had a “brief” conversation with General Manager Dave Gettleman, and he called leaving New York “bittersweet, but it is what it is. It’s life.”

Gettleman had said in recent weeks that the Giants had not signed Beckham to a new contract with the intention of trading him. A person familiar with the team’s thinking said this week that the Giants were not actively shopping Beckham but were listening to any offers from other teams.

Beckham’s off-field behavior irked Giants officials at times over the years. Co-owner John Mara said last March at the annual league meeting that he was “tired of answering questions” about Beckham’s off-field issues and that the team would listen to trade offers for Beckham. That came soon after video had surfaced on social media of Beckham alongside a woman who had a credit card and what appeared to be a white powdery substance.

“First of all, I don’t know what was in that video exactly,” Mara said then. “But I’ve said before that I’m tired of answering questions about Odell’s behavior and what the latest incident is. I think he knows what we expect of him, and now it’s up to him.”

The Giants didn’t trade Beckham then, instead signing him in August to a new five-year contract worth as much as $95 million. That deal was part of Gettleman’s approach of doubling down on the Giants’ present rather than beginning a rebuilding project. He retained veteran quarterback Eli Manning and used the second selection in last year’s draft on a running back, Saquon Barkley, instead of getting Manning’s eventual successor at quarterback.

Barkley had a successful season and was named the NFL’s offensive rookie of the year. But the Giants stumbled their way to a 5-11 record and finished last in the NFC East. They have retained Manning, who turned 38 in January. But the trade of Beckham leaves room to wonder whether they now are in rebuilding mode.

The Browns’ rebuilding under General Manager John Dorsey is on fast-forward. Things are looking up after the Browns went 7-8-1 last season and remained in AFC playoff contention until late in the season. Baker Mayfield, the quarterback taken first in last year’s draft, appears to be the real deal, and now he has Beckham among his receivers. Could the Browns be building a powerhouse?

“We all know it’s a quarterback-driven league, and you have to have certain pieces in place to move a team forward,” Dorsey said at the NFL scouting combine. “It just so happens to be the quarterback position. You first and foremost have to get that position right, regardless of if it’s a trade or the draft or unrestricted free agency. You build your team around that.”

Dorsey was asked at the combine about trading for Brown and, referring to Steelers executive Kevin Colbert, said: “I’m not going to talk about another team’s players. But if Kevin, you’re out there, here’s my cellphone right here.”

He then was asked about the possibility of trading for Beckham and, referring to Gettleman, Dorsey said: “Well, Dave, here’s my cellphone over here.”

It seemed at the time like just playful banter. By Tuesday night, though, that banter had developed into a deal that changed the NFL’s landscape.

More NFL coverage:

With Odell Beckham Jr. trade, the Browns just became Super Bowl contenders

Winners and losers of NFL free agency: Raiders needed help and they got it

The Jaguars could make Nick Foles a $100 million quarterback. Why? They were desperate.

The Raiders hold the keys to the NFL’s offseason, and it might be a wild ride