Financial details were not disclosed.
The 28-year-old defenseman could have been an unrestricted free agent July 1. He matched an NHL personal high with 13 points (three goals, 10 assists) this season despite missing 36 games with an upper-body injury. He had one assist and averaged 22:18 of ice time in Colorado's six-game loss to the Nashville Predators in the Western Conference First Round.
"Mark has been a steady part of our blue line since joining the team and has helped solidify our defensive depth," Avalanche general manager Joe Sakic said. "He has played important minutes for us and has been a key penalty-killer. We are pleased to have Mark under contract for the next two seasons."
Claimed off waivers from the Montreal Canadiens on Feb. 2, 2017, Barberio has 53 points (13 goals, 40 assists) in 239 NHL games with the Tampa Bay Lightning, Canadiens and Avalanche. He was a sixth-round pick (No. 152) of the Lightning in the 2008 NHL Draft.
The Avalanche went 43-30-9 to clinch the second wild card into the Stanley Cup Playoffs from the Western Conference, one season after finishing last in the NHL (22-56-4).