PORTLAND, Ore. -- Free-agent guard Jamal Crawford has joined the Portland Trail Blazers.

Crawford announced his choice on Twitter, posting "Rip city!!!"

The Blazers made it official a few hours later on Thursday when they announced they had signed Crawford. The deal is for two years and $10 million, with a player option for his second year, sources told ESPN The Magazine's Chris Broussard.

Crawford chose Portland over Sacramento, which was offering a two-year deal worth $6.5 million per season, and New York, which offered $5 million over two years, sources told Broussard.

"We were a long shot to start with," Knicks coach Mike D'Antoni said on Thursday afternoon, acknowledging the Knicks' low bid for Crawford. "I think the relationships that he had here in New York and how he loved it -- I thought we had a shot at it."

In order to make a deal with Crawford, the team used the NBA's new amnesty clause to waive All-Star guard Brandon Roy, who announced his retirement last week because of ongoing knee problems.

An 11-year veteran, Crawford played for the Atlanta Hawks the last two seasons. For his career, the 31-year-old has averaged 15.2 points, 2.6 rebounds and 3.9 assists. He won the NBA's Sixth Man award in 2010.

"We've thought highly of Jamal for a long time and think he's a great fit for our team," said Chad Buchanan, Portland's acting general manager. "He brings a scorer's touch and veteran leadership that will help us immediately."

Blazers guard Wesley Matthews said he spoke to Crawford on Wednesday night.

"I'm excited about it," Matthews said. "He wants to come and win and that's what we're about."

Crawford, a 6-foot-5 shooting guard, will help the Blazers deal with the absence of Roy and former Blazer Rudy Fernandez, who was traded away on draft night in June.

Matthews said he was unconcerned about potential competition for playing time.

"We can coexist at the same time, similar to what they did in Atlanta with Joe Johnson and him," Matthews said.

By using the amnesty clause to waive Roy, the Blazers freed up salary cap space that allowed the team to use a mid-level exception on Crawford. Roy, who was under a max contract, was set to make $15 million this year.

"Brandon's announcement that he is leaving the game ultimately shifted our decision to amnesty," Buchanan said in a statement. "We're given the immediate option to obtain additional salary cap flexibility as we will no longer be in the luxury tax -- something that is critical to improving our team and helping us recover from the loss of a player of Brandon's caliber."