Article: Denmark
Section: Early modern history (1536–1849)

Question: When did Christian IV of Denmark attack Sweden?

Early modern history (1536–1849).
After Sweden permanently broke away from the Kalmar Union in 1523, Denmark tried on two occasions to reassert control over Sweden.
The first was in the Northern Seven Years' War which lasted from 1563 until 1570.
The second occasion was the Kalmar War when King Christian IV attacked Sweden in 1611 but failed to accomplish his main objective of forcing Sweden to return to the union with Denmark.
The war led to no territorial changes, but Sweden was forced to pay a war indemnity of 1 million silver riksdaler to Denmark, an amount known as the "Älvsborg ransom".
King Christian used this money to found several towns and fortresses, most notably Glückstadt (founded as a rival to Hamburg), Christiania (following a fire destroying the original city of Oslo), Christianshavn, Christianstad, and Christiansand.
Christian also constructed a number of buildings, most notably Børsen, Rundetårn, Nyboder, Rosenborg, a silver mine, and a copper mill.
Inspired by the Dutch East India Company, he founded a similar Danish company and planned to claim Ceylon as a colony, but the company only managed to acquire Tranquebar on India's Coromandel Coast.
Denmark's large colonial aspirations were limited to a few key trading posts in Africa and India.
In the Thirty Years' War, Christian tried to become the leader of the Lutheran states in Germany but suffered a crushing defeat at the Battle of Lutter.
The result was that the Catholic army under Albrecht von Wallenstein was able to invade, occupy, and pillage Jutland, forcing Denmark to withdraw from the war.
Denmark managed to avoid territorial concessions, but Gustavus Adolphus' intervention in Germany was seen as a sign that the military power of Sweden was on the rise while Denmark's influence in the region was declining.
Swedish armies invaded Jutland in 1643 and claimed Skåne in 1644.
According to Geoffrey Parker, "The Swedish occupation caused a drop in agricultural production and a shortage of capital; harvest failure and plague ravaged the land between 1647 and 1651; Denmark's population fell by 20 per cent.
"In the 1645 Treaty of Brømsebro, Denmark surrendered Halland, Gotland, the last parts of Danish Estonia, and several provinces in Norway.
In 1657, King Frederick III declared war on Sweden and marched on Bremen-Verden.
This led to a massive Danish defeat and the armies of King Charles X Gustav of Sweden conquered both Jutland, Funen, and much of Zealand before signing the Peace of Roskilde in February 1658 which gave Sweden control of Skåne, Blekinge, Trøndelag, and the island of Bornholm.
Charles X Gustav quickly regretted not having destroyed Denmark completely and in August 1658 he began a two-year long siege of Copenhagen but failed to take the capital.
In the following peace settlement, Denmark managed to maintain its independence and regain control of Trøndelag and Bornholm.
Denmark tried to regain control of Skåne in the Scanian War (1675–79) but this attempt was a failure.
Following the Great Northern War (1700–21), Denmark managed to restore control of the parts of Schleswig and Holstein ruled by the house of Holstein-Gottorp in 1721 and 1773, respectively.
In the Napoleonic Wars, Denmark originally tried to pursue a policy of neutrality and trade with both France and the United Kingdom and joined the League of Armed Neutrality with Russia, Sweden, and Prussia.
The British considered this a hostile act and attacked Copenhagen in both 1801 and 1807, in one case carrying off the Danish fleet, in the other, burning large parts of Copenhagen.
This led to the so-called Danish-British Gunboat War.
The British control of the waterways between Denmark and Norway proved disastrous to the union's economy and in 1813, Denmark-Norway went bankrupt.
The Danish-Norwegian union was dissolved by the Treaty of Kiel in 1814.
Norway entered a new union with Sweden which lasted until 1905.
Denmark kept the colonies of Iceland, Faroe Islands, and Greenland.
Apart from the Nordic colonies, Denmark ruled over Danish India (Tranquebar in India) from 1620 to 1869, the Danish Gold Coast (Ghana) from 1658 to 1850, and the Danish West Indies (the U.S. Virgin Islands) from 1671 to 1917.