DALLAS - J.J. Barea is returning to Dallas after considering a move to Miami in free agency.

A person with knowledge of the deal told The Associated Press on Monday that Barea has agreed to terms with the Mavericks. The person spoke on condition of anonymity because players can't sign contracts until Thursday.

The deal is reportedly for two years and $5.6 million. The 6-foot guard told a newspaper in his native Puerto Rico that he was rejoining Dallas.

The Mavericks brought back Barea early last season when Minnesota bought out the remainder of the four-year deal he signed after playing a key role in the Mavericks' run to the NBA championship in 2011.

Early in free agency, Barea was linked to Miami — where he went to high school — but that was before the Mavericks improved their outlook significantly by reaching deals with centre DeAndre Jordan and shooting guard Wesley Matthews.

The 31-year-old Barea spent his first five seasons with Dallas after catching on as an undrafted free agent out of Northeastern. The Mavericks trailed the Heat 2-1 in the NBA Finals four years ago when coach Rick Carlisle inserted Barea into the starting lineup. Dallas won three straight games to take the franchise's first title.

Barea fits Carlisle's offence as a strong pick-and-roll player with a knack for getting to the basket. He has career averages of 8.2 points and 3.4 rebounds in nine seasons.

The Mavericks have also reached agreement on a deal with former Utah forward Jeremy Evans, who announced his plan to join Dallas on Twitter. The 6-9 Evans was a late second-round pick by the Jazz in 2010 and has career averages of 3.7 points and 2.7 rebounds.