Judges 8:28

Thus was Midian subdued before the children of Israel By the hand of Gideon humbled and brought under, their power over Israel was broken, and they delivered out of their hands:

so that they lifted up their heads no more; in a proud and haughty manner to insult them, and in an hostile way to invade and oppress them; such a blow was given them that they could not recover themselves, nor do we read of any effort of theirs ever after, or of their giving or attempting to give any disturbance to Israel, or any other nation:

and the country was in quietness forty years in the days of Gideon; that is, the land of Canaan; it was free from wars with Midian, or any other people, and enjoyed undisturbed peace and tranquillity. According to Bishop Usher F13, this was the fortieth year from the rest restored by Deborah and Barak; and, according to Abarbinel and others, these forty years are to be reckoned from the beginning of the servitude; that is, the seven years' oppression under the Midianites are included in them; but I cannot see that in this instance, and in others before met with, years of bondage can be counted with years of peace and prosperity, and go under that general name. The true sense seems to be, that after the Israelites had been in subjection to the Midianites for seven years, and Gideon had delivered them, that from thenceforward they had rest and quietness forty years, which in all probability was the time Gideon lived after his victories.