The deal, backed by the Swiss government, follows weekend talks aimed at preventing its collapse.