The Get Up! crew examines the risk factors for Toronto in the trade with the Spurs for Kawhi Leonard. (1:50)

The San Antonio Spurs have traded Kawhi Leonard and Danny Green to the Toronto Raptors for DeMar DeRozan, Jakob Poeltl and a protected 2019 first-round pick, the Spurs announced Wednesday.

The first-round pick Toronto sent to San Antonio is a protected 1-20 selection, a source told ESPN. After one year, it becomes two second-round picks.

The Spurs are including $5 million in cash to the Raptors (an amount meant to cover the luxury-tax hit incurred due to the trade kicker), a source told ESPN's Zach Lowe.

Green posted a note on Twitter, thanking San Antonio:

SAN ANTONIO....Can't express the LOVE I have for you, the city, the fans & the organization. I want to thank you all for allowing me to be a part of something AMAZING for so many years. I... https://t.co/NO8ZixmjJJ — Danny Green (@DGreen_14) July 18, 2018

Toronto and San Antonio have been talking about the trade for two weeks, and several incarnations of packages have been discussed, league sources said. Sources close to DeRozan told ESPN's Chris Haynes that DeRozan met with Toronto officials in Las Vegas during summer league and believed that he would not be traded.

In a story posted on his Instagram page Wednesday morning, DeRozan wrote, "Be told one thing & the outcome another. Can't trust em. Ain't no loyalty in this game. Sell you out quick for a little bit of nothing... Soon you'll understand... Don't disturb..."

Raptors president of basketball operations Masai Ujiri is taking a significant risk with the trade. Ujiri is making the deal with a determination that he can convince Leonard to re-sign with the Raptors next summer in free agency, sources said. Toronto would be able to offer Leonard a five-year, $190 million contract next summer. If Leonard left the Raptors, he could sign a four-year, $141 million deal with a team with the available salary-cap space.

Leonard has been clear that he plans to sign with the Los Angeles Lakers in free agency.

DeRozan, a four-time All-Star, has three years and $83 million left on his contract, including an early-termination option for the 2020-21 season.

Spurs coach Gregg Popovich said Wednesday that he talked with both Leonard and Green after the trade was agreed upon. He said the details of those conversations will remain private. He said he hasn't yet talked to DeRozan but plans to do so Wednesday afternoon.

Popovich said he is thrilled to be able to acquire DeRozan in the trade and looks forward working with him at Team USA minicamp next week. He also said he is looking forward to working with Leonard at the minicamp.

Popovich said the narrative that Leonard was a bad teammate is "ridiculous."

"Kawhi conducted himself wonderfully while he was here," Popovich said, crediting him on for being a "hard worker all the time."

"At this point it's time to move on," Popovich said. "I'm concerned about Jakob and DeMar and our basketball team. We've got a lot of young kids and it's exciting."

Popovich said he isn't interesting in talking about the past.

"I don't even like talking about Tim Duncan," he said.

ESPN's Chris Haynes contributed to this story.