The deal guard J.J. Barea signed with the Dallas Mavericks ended up being significantly richer than the one he originally agreed to.

Barea signed a four-year, $16 million deal Thursday. He originally agreed to sign a two-year, $5.7 million deal, which would have given him Dallas' cap-room exception, but the sides negotiated a new deal after center DeAndre Jordan backed out of his commitment to sign a max contract with the Mavs.

J.J. Barea got more money from the Mavs after DeAndre Jordan changed his mind and decided to re-sign with the Clippers instead. Andrew D. Bernstein/NBAE/Getty Images

"They knew I wanted to be there for a long time," Barea told ESPN.com. "They wanted me there for a long time, so we made it happen."

Barea, who has averaged 8.2 points and 3.4 assists during his nine-year career, isn't the only Dallas player to benefit financially from Jordan's reversal. Shooting guard Wesley Matthews will earn an extra $13 million over the course of his four-year contract because of Jordan's decision.

The Mavs agreed to pay Matthews as much as possible depending on whether Jordan chose Dallas. Matthews would have been paid $57 million over four years if Jordan had stuck to his commitment, but Matthews ended up signing a max contract worth $70 million.

Barea, a key contributor to the Mavericks' 2010-11 championship team, returned to Dallas in the fall after being bought out from the Minnesota Timberwolves for the final season of his four-year, $18 million deal.

The 31-year-old point guard, who spent the first five seasons of his career with the Mavs after breaking into the league as an undrafted free agent, was an effective fourth guard in his second Dallas stint. He averaged 7.5 points and 3.4 assists in 17.7 minutes per game last season. His assist-turnover ratio (3.78-1) ranked behind only the Los Angeles Clippers' Chris Paul and the Denver Nuggets' Ty Lawson among league leaders.