This performance of time-varying capital controls on cross-border bank borrowing is studied in an open-economy, dynamic stochastic general equilibrium model with financial frictions and imperfect capital mobility. The model is parameterized for a middle-income country and replicates the stylized facts associated with a drop in world interest rates—capital inflows, real appreciation, credit boom, asset price pressures, and output expansion. A capital controls rule, which is fundamentally macroprudential in nature, is defined in terms of changes in bank foreign borrowing. The welfare-maximizing rule is established numerically and compared to the Ramsey policy. The analysis is then extended to solve jointly for optimal countercyclical reserve requirements and capital controls rules. The results show that the implementation of a countercyclical credit-based reserve requirement rule induces less reliance on capital controls. Thus, these two instruments are partial substitutes in maximizing welfare.