1) Juan was born as a monkey to human parents after his father prayed for a son, even if it was in the form of a monkey. He grew up and set off to find a wife, eventually rescuing a hidden princess and claiming her as his bride to fulfill a promise to the king.
2) Though the king and queen rejected the princess for marrying the monkey Juan, he later revealed his human identity by removing his disguise.
3) Juan and the princess convinced the king and queen of the truth and of God's will, and eventually succeeded them as rulers, living happily ever after.