In Paulo Coelho's story, The Alchemist, it is only because of the news of the tribal wars approaching that Santiago sees the vision of the hawks fighting. When he speaks of what he has seen, the alchemist comes to find out who is reading signs based upon the behavior of his birds. It is here that Santiago and the alchemist meet, and the wisdom of Santiago's responses based upon what he has learned on his long journey, impress the alchemist. They begin their acquaintance. The two start out on a journey across the desert.
When the alchemist and Santiago reach one of the warring tribes, they are taken prisoner, accused of spying. As the alchemist explains why they are there, he identifies the boy as an alchemist who can control the wind. And the alchemist says that after three days, if Santiago cannot do so, they will forfeit their lives.
Santiago is desperate: he has no idea how to do what the alchemist has promised. However, when the time comes, he joins himself with nature—with the wind itself. Then the wind obscures the sun so that the boy can address it. Between the wind and the sun, the boy is able to "reach through to the Soul of the World," which was a "part of the Soul of God," and learns that the Soul of God was a part of him...and he knew he could perform the miracle that the tribal chief expected of him. He does so, and finally they are released.
When the boy and the alchemist separate, the boy heads to the Pyramids, where he is robbed and beaten, but told of a recurring dream one of the thieves has had about Santiago's home in Spain. At this moment he realizes what he must do: go home to Spain. If he had not experienced the dangers of the tribal war, he would not have reached the Pyramids and made his discovery.
Wherever your heart is, that is where you'll find your treasure.