Once upon a time when the Pandavas were in exile, Arjuna was in search of ways to increase his archery prowess. So he decided to obtain the pashupatastra from Lord Shiva through penance. On his journey towards penance, he came across Hanuman sitting under a tree and meditating. Arjuna at once recognised Hanuman despite his old age and called out to him. Hanuman came out of his trance and welcomed him. They then started to speak about many things.
At one point in a discussion, Hanuman praised Arjuna for his archery skills and it went to his head. So, he questioned Hanuman as to why Lord Rama did not build a bridge of arrows, and instead used monkeys to build a bridge of stones. Hanuman then said that if it was so simple, then he should show him how it is done. Arjuna said that if he failed, he would give up his life.
So, they went to a nearby river and Arjuna shot many arrows and made a bridge from one side to the other. Just as Hanuman was about to keep his right foot on the bridge of arrows, his tail brushed the arrows and the bridge collapsed. Arjuna was shocked and did not know what to do. He then set up a fire and was just about to give up his life, when a sage appeared.
The sage told Arjuna to not give up and try again after praying to the lord. Arjuna did the same and went to the river. He built a bridge of arrows once again and this time Hanuman crossed the bridge and came back. While crossing the bridge, Hanuman saw a giant turtle supporting the bridge from below in the river. He smiled to himself and congratulated Arjuna for accomplishing such a feat. The sage then transformed himself into Lord Krishna. He congratulated Arjuna for his archery skills and also taking the form of Lord Rama, blessed Hanuman and then disappeared.