This paper investigates Ramsey-optimal fiscal policy in a closed economy with savers and borrowers in the presence of a private debt deleveraging shock where monetary policy is constrained by the zero lower bound (ZLB). It is shown that monetary policy being constraint by the ZLB implies huge welfare losses. Applying an optimal fiscal policy in this situation is found to be highly effective by eliminating roughly one quarter of the total welfare loss of being at the ZLB. Here, following the optimal fiscal policy imlies a prolonged stay at the ZLB. Moreover, while the relative effectiveness of consumption and wage taxes depends on the presence of government spending as well as on the specific monetary policy conducted, all Ramsey-policies aiming at maximizing economy-wide welfare imply reducing the welfare of savers. Furthermore, it is found that the welfare gains of having government spending as an additional instrument are small compared to the total welfare gains of applying a Ramsey-optimal instead of an exogenous policy. Finally, it is shown that if fiscal policy is set optimally, conducting an inflation-targeting policy instead of an optimal monetary policy need not necessarily imply welfare losses.