The bird by saving the ant actually upheld Dharma and as a consequence, Dharma saved the bird in the form of the ant. If we uphold Dharma, Dharma will always protect us.
Read this post on makkathayam.com