Forward-backward smoothing based unknown input and state estimation for dynamic systems is studied in this paper, motivated by reconstruction of an oceanographic flow field using a swarm of buoyancy-controlled drifters. The development is conducted in a Bayesian framework. A Bayesian paradigm is constructed first to offer a probabilistic view of the unknown quantities given the measurements. Then a maximum a posteriori is established to build a means for simultaneous input and state smoothing, which can be solved by the classical Gauss-Newton method in the nonlinear case. Application to reconstruction of a complex three-dimensional flow field is presented and investigated via simulation studies. Copyright (c) 2014 John Wiley & Sons, Ltd.