We study the adjustment process of a small open economy to a sudden worsening of external conditions. To model the sudden stop, we use a highly non-linear specification that captures credit constraints in a convenient way. The advantage of our approach is that the effects of the shock become highly conditional on the external debt position of the economy. We adopt a two-sector model with money-in-the-utility, which allows us to study sectoral asymmetries in the adjustment process, and also the role of currency mismatch. We calibrate the model to the behavior of the Hungarian economy in the 2000s and its crisis experience in 2008-11 in particular. We also calculate four counterfactuals: two with different exchange rate policies (a more flexible float and a perfect peg), and then these two policy regimes with smaller initial indebtedness. Overall, our model is able to fit movements of key aggregate and sectoral macroeconomic variables after the crisis by producing a large and protracted deleveraging process. It also offers a meaningful quantification of the policy tradeoff between facilitating the real adjustment by letting the currency depreciate and protecting consumption expenditures by limiting the adverse effect of exchange rate movements on household balance sheets.