FATODE: a library for forward, adjoint, and tangent linear integration of ODEs. Fatode is a Fortran library for the integration of ordinary differential equations with direct and adjoint sensitivity analysis capabilities. The paper describes the capabilities, implementation, code organization, and usage of this package. Fatode implements four families of methods: explicit Runge-Kutta for nonstiff problems, fully implicit Runge-Kutta, singly diagonally implicit Runge-Kutta, and Rosenbrock for stiff problems. Each family contains several methods with different orders of accuracy; users can add new methods by simply providing their coefficients. For each family the forward, adjoint, and tangent linear models are implemented. General purpose solvers for dense and sparse linear algebra are used; users can easily incorporate problem-tailored linear algebra routines. The performance of the package is demonstrated on several test problems. To the best of our knowledge Fatode is the first publicly available general purpose package that offers forward and adjoint sensitivity analysis capabilities in the context of Runge-Kutta methods. A wide range of applications is expected to benefit from its use; examples include parameter estimation, data assimilation, optimal control, and uncertainty quantification.