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