In the Talmud tractate Brachot page 10, we learn that there were some gangsters (biryonim) who caused serious suffering for Rabbi Meir. Rabbi Meir at the beginning thought that the appropriate response would be to pray that these gangsters die.
In the end, his wife Bruria convinced him that he should pray for those gangsters to repent.
The Talmud records that the gangsters indeed repented (seemingly due to Rabbi Meir's prayer).
The question is, how can we explain the ability of prayers to induce people to repent in light of another principle of Judaism, "all is in the hands of heaven except the fear of heaven" (tractate Brachot 33b, tractate Megilla 25a, tractate Nida 16b)?