By Tim MacMahon of

Veteran guard J.J. Barea is on the verge of agreeing to a two-year deal to return to the Dallas Mavericks, according to league sources.

The Mavs will give Barea the room exception, paying him a salary of $2.8 million per year, a source told

El Nuevo Día, a newspaper in Barea’s native Puerto Rico, was the first to report that Barea had agreed to the deal.

The Mavs still hope to sign free-agent point guard Jeremy Lin and are pursuing avenues to create a salary slot larger than the veteran’s minimum for him, sources said. Possibilities include waiving veteran point guard Raymond Felton via the stretch provision or trading Felton in a cost-cutting move.

Barea, a key contributor to the Mavericks’ 2010-11 championship team, returned to Dallas in the fall after receiving a buyout from the Minnesota Timberwolves for the final season of his four-year 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-to-turnover ratio (3.78-to-1) ranked behind only the Los Angeles Clippers’ Chris Paul and the Denver Nuggets’ Ty Lawson among league leaders.

Generously listed at 6-feet, Barea has averaged 8.2 points and 3.4 assists during his nine-year career.