Like his father, Frederick V sought to retain Denmark's neutrality in the wars that raged in neighbouring territories. Under the guidance of his minister Johann Hartwig Bernstoff, he even managed to avoid being drawn into the Seven Years' War.