When I first read in 1:3 that Jonah tried to flee to Tarshish, I assumed this was an ancient name for the city of Tarsus in eastern Asia Minor. But some scholars speak of Tarshish as a city in the far west of the Mediterranean. If this is true, then Tarshish would have been in the south of modern day Spain, perhaps as far west as Gibraltar. That would mean Jonah was determined to escape as far as he could from Nineveh; all the way to the edge of the known world.
As chapter 2 begins, Jonah offers a “Last Resort” prayer. He literally has no place to turn, so he prays to God as a last resort.
But there is a haughtiness in his prayer. He expects to be saved because of who he is, rather than because of his own repentance or God’s mercy. He sets himself apart as better than “those who cling to worthless idols”. So at the same time he recognizes his helplessness and need for God’s deliverance, he completely fails to recognize his spiritual helplessness and need for forgiveness.
Nevertheless, God does save him, although in a somewhat vulgar fashion. The fish vomits him up onto the shore.