Mesoporous tantalum phosphate was prepared from tantalum tartrate complex and ammonium dihydrogenphosphate, by using hexadecyltrimethylammonium bromide as surfactant, and ulterior calcination at 550 degrees C. It exhibits a high specific surface area (256 m(2) g(-1)) and strong acidity (1480 mu mol NH3 g(-1)), and it can be successfully used as solid catalyst in the transesterification of sunflower oil with methanol. With only 5 wt.% of this catalyst in relation to the oil, a 89 wt.% of biodiesel formation was attained at 200 degrees C and after only 2 h of reaction. The catalyst is very stable and no leaching of tantalum or phosphorus species to the liquid medium was found. Moreover, this acid solid catalyst is able to simultaneously catalyse the esterification of free fatty acids (FFAs) and the transesterification of triglycerides, even in the presence of 9% of FFAs. Its catalytic performance is well maintained after three catalytic cycles, without any treatment and even in the presence of 5 wt.% of water. The use of a co-solvent do not enhanced the biodiesel formation. (C) 2012 Elsevier B.V. All rights reserved.