Joshua 10:12
Then spake Joshua to the LORD in the day when the LORD delivered up the Amorites before the children of Israel, and he said in the sight of Israel, Sun, stand thou still upon Gibeon; and thou, Moon, in the valley of Ajalon. Then spake Joshua to the LORD in the day when the LORD delivered up the Amorites before the children of Israel, and he said in the sight of Israel, Sun, stand thou still upon Gibeon; and thou, Moon, in the valley of Ajalon.
Joshua asked for daylight to be prolonged so that Israel could finish routing the fleeing Amorites before they escaped to the mountains and rallied again. At his word the sun stood still over Gibeon and the moon over the valley of Ajalon at Bethhoron while Israel battled the Amorites or Canaanites, with daylight lasting long enough to gain the victory and defeat its enemies. The event showed that God answered Joshua's prayer and fought for Israel, giving evidence of God's power.
Joshua prayed in faith for God's aid after doing all he could to defeat the enemy, and his request for the sun and moon to stand still was inspired by God and not presumptuous. Success comes through the union of divine power and human effort, and those who rely most fully on God are people of prayer and power. The standing sun was one of many similar wonders in Israel's history, the kind of outward sign from heaven later demanded from Jesus by the Pharisees and Sadducees, but no mere external evidence could benefit them because they needed spiritual renovation rather than intellectual enlightenment.
The same wonder of the sun rising in full brightness and the moon standing still will be repeated when God delivers His people from danger in the final time of trouble, at midnight, while the wicked mock around the saints and pursue them as they cry day and night for deliverance. The saints will behold it with solemn joy as a token of their deliverance while the wicked look on with amazement, and it will be followed in quick succession by signs and wonders with everything turned out of its natural course. Then streams will cease to flow, dark heavy clouds will come up and clash against each other leaving one clear place of settled glory from which the voice of God like many waters shakes the heavens and the earth, the sky will open and shut and be in commotion, the mountains will shake like a reed in the wind and cast out ragged rocks all around, and the sea will boil like a pot and cast out stones upon the land.