This study examines the fungibility of foreign aid and makes three contributions to the existing literature. Firstly, fungibility of aid at the aggregate level is reexamined on a richer panel dataset of 91 developing countries for 1980-2009, taking into account endogeneity of aid and autocorrelation in residuals. Results indicate that aid is strongly fungible: around 80 % is substituting rather than increasing government spending in the short run. There is also substantial heterogeneity in the sample, with aid being more fungible for countries with a low share of aid in GDP. Secondly, aid is disaggregated into bilateral and multilateral components. Despite substantial differences between both components, there are only very small indications that multilateral aid is less fungible than bilateral aid and estimates are volatile when aid is instrumented. Thirdly, this study attempts to distinguish between off- and on-budget aid at the aggregate level using the value of technical cooperation as a proxy for off-budget aid. While on-budget aid is strongly fungible, off-budget aid is non-fungible. In the long run, around 50 % of aid increases government expenditures, although results are not stable. High levels of fungibility (except for off-budget aid) suggest that resources spent on earmarking may be wasted and donors should rethink the way aid is distributed.