Diego Velázquez first studied under Francisco Herrera the Elder, and then he was apprenticed to Francisco Pacheco for about six years. When Philip IV came to the throne in 1621, Velázquez sought to obtain royal patronage. He finally won it in 1623, becoming the only painter allowed to paint the king.