The Norwegian monarch is the head of state of Norway, which is a constitutional and hereditary monarchy with a parliamentary system. The Norwegian monarchy can trace its line back to the reign of Harald Fairhair and the previous petty kingdoms which were united to form Norway; it has been in unions with both Sweden and Denmark for long periods.