We present a mathematical model and corresponding series of microfluidic experiments examining the flow of a viscous fluid past an elastic fibre in a three-dimensional channel. The fibre’s axis lies perpendicular to the direction of flow and its base is clamped to one wall of the channel; the sidewalls of the channel are close to the fibre, confining the flow. Experiments show that there is a linear relationship between deflection and flow rate for highly confined fibres at low flow rates, which inspires an asymptotic treatment of the problem in this regime. The three-dimensional problem is reduced to a two-dimensional model, consisting of Hele-Shaw flow past a barrier, with boundary conditions at the barrier that allow for the effects of flexibility and three-dimensional leakage. The analysis yields insight into the competing effects of flexion and leakage, and an analytical solution is derived for the leading-order pressure field corresponding to a slit that partially blocks a two-dimensional channel. The predictions of our model show favourable agreement with experimental results, allowing measurement of the fibre’s elasticity and the flow rate in the channel.