Causal estimates can be obtained by instrumental variable analysis using a two-stage method. However, these can be biased when the instruments are weak. We introduce a Bayesian method, which adjusts for the first-stage residuals in the second-stage regression and has much improved bias and coverage properties. In the continuous outcome case, this adjustment reduces median bias from weak instruments to close to zero. In the binary outcome case, bias from weak instruments is reduced and the estimand is changed from a marginal population-based effect to a conditional effect. The lack of distributional assumptions on the posterior distribution of the causal effect gives a better summary of uncertainty and more accurate coverage levels than methods that rely on the asymptotic distribution of the causal estimate. We discuss these properties in the context of Mendelian randomization. Copyright © 2012 John Wiley & Sons, Ltd.