The Mets extended an identical offer to Balfour, a source told ESPNNewYork.com, but Balfour chose the Rays because he lives in the area.
Balfour, a 36-year-old Australia native, went 1-3 with a 2.59 ERA and 38 saves last season in Oakland and made the American League All-Star team. He pitched previously in Tampa Bay from 2007-10.
"We've had some exceptional teams," Rays owner Stu Sternberg said. "We want to give this organization the best chance to win, and we know it's going to cost us more than we can afford to pay."
The deal comes a month after a proposed two-year, $15 million agreement between Balfour and the Baltimore Orioles fell through after the O's objected to the results of Balfour's physical exam.
Balfour is a career 28-17 with 72 saves over 10 seasons with Minnesota, Tampa Bay, Milwaukee and Oakland.
Barring a spring training surprise, Balfour will succeed Fernando Rodney as Tampa Bay's closer this season. He joins a strong Rays bullpen contingent that also includes Joel Peralta, Jake McGee, Heath Bell and Juan Carlos Oviedo.
The Associated Press contributed to this report.