This paper presents a model of rational Bayesian agents with speculative attacks in a regime of exchange rate which is pegged within a band. Speculators learn from the observation of the exchange rate within the band whether their mass is sufficiently large for a successful attack. Multiple periods are necessary for the existence of speculative attacks. Various defense policies are analyzed. A trading policy by the central bank may defend the peg if it is unobserved and diminishes the market's information for the coordination of speculators.