Why is a Fifth of Liquor Called a Fifth?

Apparently, the English used to sell their liquor in Imperial gallons, which were approx. 160 ounces, so an imperial quart was 40 ounces. American gallons were only 128 ounces, so we could only get 5 quarts from an Imperial gallon-one fifth of a bottle.