Goya later moved to Madrid where he studied with Anton Raphael Mengs, a painter who was popular with Spanish royalty. Goya and Mengs did not like each other, and Goya got bad marks in his examinations. Goya tried to join the Spanish Royal Academy of Fine Art in 1763 and 1766, but failed.