He was born in Villanueva de Gállego, near Zaragoza in Aragon, and studied initially in Zaragoza and then transferred to the Real Academia de Bellas Artes de San Fernando and the "Academia de Acuarelistas" (Academy of Watercolorists) in Madrid. In 1873, he became one of the first students chosen to study at the new Spanish Academy in Rome. From there he had opportunities to travel to France and Venice and studied the old masters. In 1878 he submitted his painting Doña Joanna the Mad or (Juana la Loca) to the National Exhibition in Spain and was awarded the Medal of Honor. The Spanish Senate then commissioned him to create La Rendición de Granada (The Surrender of Granada) that took him three years to complete (1882). In 1881 he became the Director of the Spanish Arts Academy in Rome, but resigned from this post after two years. He traveled, mostly in Italy, portraying local themes and people. In 1897 he returned to Madrid as the director of the Museo del Prado. He held this position only briefly and then focused again on painting.
His total output is well over 1,000 paintings showing his interest in a variety of subjects and styles, often without regard of the current fashion. He is primarily recognized for his historical paintings, the last one completed in 1910 carries one of the longer titles of a major painting, Cortejo del bautizo del Príncipe Don Juan, hijo de los Reyes Católicos, por las calles de Sevilla (Retinue of the Baptism of Don Juan, son of the Catholic Monarchs, Along the Streets of Seville). Much more common, however, are costumbristas—often romanticized studies that show local customs or manners—and landscapes that are often sketchy, with impressionistic influences. Financial duress after the bankruptcy of his bank may have imposed a special need to be productive.