We analyze the issues relative to the formation of sub-unions in a federation, called enhanced cooperation agreements in the European Union. When centralization is not politically feasible, an agreement among a subset of countries may allow such countries to exploit benefits from coordination that would other-wise be lost. Other countries in the federation may object to the sub-union because it changes the status quo; if cooperation at the federal level becomes convenient in the future, the change in the status quo may adversely affect the countries which remained initially outside the sub-union. We show that as long as the countries can commit to coordinate on a policy which takes into account the utility of the excluded countries, sub-union formation may be optimal. The relative advantage of a sub-union towards immediate centralization increases when transfers are costly. On the other hand, if commitment is not possible then the excluded countries may be penalized. We use the results to discuss the newly introduced rules for enhanced cooperation agreements in the European Union.