When Jesus went to Jerusalem for the Passover He was invited to a supper in the home of Simon the leper, in Bethany. During this supper Mary anointed His feet. Although the disciples rebuked her for this, Jesus praised Mary for her act of love.
The following day Jesus commanded His disciples to get a colt of an ass so that He could ride into Jerusalem so that also this prophecy would be fulfilled. His disciples and the people thought that he would be their king and rejoiced.