He was Professor of natural history in the University of Barcelona (1900) where he had problems due to his evolutionist ideas. In 1907, he founded and directed the Laboratorio de Biología Marina de las Baleares, in Mallorca, and the Instituto Español de Oceanografia. In 1939 he was exiled to Mexico.