The title of Duke was originally given to military leaders in border areas that were located in exposed areas, for example a duchy. Dukes had the responsibility for the defense of the duchy.
The Danish word for duke (hertug) stems from the German word hertoch, which means army leader.
In the history of Denmark, the title of a duke has been beseeched to the duchies of Schleswig and Holsten. Many Danish kings have held both the title of king of Denmark and duke of Schleswig or Holsten at once.
In the time period after the Middle Ages, the title of duke was often inherited rather than bestowed upon someone from outside the family.