The good King Christian II started a chain of events that he no doubt did not intend and basically things went out of control.
He was basically disposed by the nobility who backed his uncle, during the dramatic civil war known as the Feud of the Count.
He was right in trying to curb the power of the nobility, they put their own interests above that of the country, which is why he was supported by peasants and burghers.
At the time we in DK still had the term "mand af hus" which is basically an old term for general mobilization. Meaning that all free man (by 1500 that translated too all self-employed men) was armed and trained in using weapons, so that they could muster within a few hours in defense of the country, when the church-bells rang and the cry "mand af hus" was heard. The defense of DK depended on this by now old-fashioned citizens militia.
To the chagrin of the nobility the feudal system seen in most of Europe had never been fully implemented in DK. There were simply too many armed free men around, ready to rebel at the drop of a hat! That could be against taxation or a transgression by a local noble.
That doesn't mean it was a period of constant fighting. These uprising were more a kind of armed demonstrations, with a little vandalism and some beatings until the king send someone to smooth things out and find an amiable solution. - Sometimes the king send soldiers though...!
Because burghers and peasants had political rights and held seats in local councils alongside the nobility. - It's difficult to introduce genuine feudalism if those you wish to be the feudal lord over can veto you - and are armed...
That the king tended to side with the burghers and peasants against the nobility was nothing new. The nobility had the money and the power, the burghers and peasantry had the numbers. They balances each other out.
But the gap between high and low wasn't as wide at later became. A lord would know his tenants by name and take an interest in them, in return he got respect and loyalty rather than submission.
The downside to all this was that there was endless squabbling over trivial matters. This proto-democracy resulted in stagnation and Denmark was in serious need of reforms on a national level.
One popular way to kickstart reforms and introduce change (not only in DK) was to invite settlers from more progressive and innovative parts of Europe (in this case from Flanders, later Dutch, later German, later Poles) give them land and tax privileges and force the Danish population to implement changes simply to avoid being competed out of business. Settlers could make a fortune that way and many wealthy families were founded this way. To this day there are still a number of prominent families with Dutch names here in DK who go back to these settlers.
Anyway, that's the background.
Christian II did indeed take Sweden and in order to gain complete control of Sweden - and terrorize the Danish nobility, he betrayed and beheaded a number of leading Swedish nobles. The Stockholm Bloodbath.
It was according the laws and customs at the time an act of tyranny and it totally backfired!
The Swedes rebelled of course. In Sweden this was (and is) considered the worst atrocity since the crucifixion of Christ - what the Swedish burghers and peasantry thought is perhaps more nuanced... But it lead to Sweden becoming genuinely independent and of course what remained of the Kalmar Union was history.
The message was not lost on the Danish nobility! Nobles were an international class and Swedish and Danish nobles had intermarried since the dawn of time. So they had no problems agreeing on the king being a tyrant who had to go and thus started a viscous civil war.
Burghers and peasantry were not at all interested in the nobility gaining the upper hand and supported Christian II. The nobility hired combat hardened mercenaries from Central Europe. The Danish citizens militias had little chance however hard and tenacious they fought.
But to make things even more confusing and complicated Lutheranism had gained a solid foothold in DK, at least among the educated segments of the population, so in the middle of a bloody and cruel civil war the Reformation was introduced in 1536. Denmark was officially no longer Catholic.
On top of that the peasantry and workers, that is the large segment of the population who were not self-employed or owned their own land also rebelled, very much inspired by the central European peasants rebellions that took place around the same time.
They were basically socialist rebellions in response to feudalism and the ever harsher living conditions peasants in particular lived under in most of Europe. They called for political reforms, redistribution of wealth and land and protection under the law. They were very
justified demands, no matter what glasses you wear!
Very often the rebellions were supported by monks and parish priests, who lived among the population and saw how they were oppressed. And since the church supporter those in power that led to the genuine rise in a religious alternative, Protestantism. - Who was lord when Adam and Eve in Paradise were? Was a cry heard often. And Christ himself was poor and never owned land, but walked among the poor. So who were the blessed? So nobility and class came not from God, but from man. That had a lot
The rebellions were crushed with great cruelty. And I mean crushed
! At last one historian has suggested that the crushing of these central European revolts changed especially the German national character. What later became virtues like ordnung, discipline, sense of duty and obedience stems from this period - otherwise they would have been whacked on the head! It's expressed in German this way: sie war so oft geknecht dass sie kneckte bekommen (from memory). Very difficult to translate but it roughly means something like: They were beaten into slavery.
That too happened in Denmark. The peasant revolt here was led by a man called skipper Klement. (*) And crushed.
The Feud of the Count ended. It had been a traumatic war. It was time to unite and heal the wounds under Frederik II. The people was disarmed. No more revolts! The defense of the realm was placed in the hands of the king and nobles. Administrative reforms were introduced, a central administration put in place with a proper capital, Copenhagen.
Catholic churches were converted into Lutheran churches, but quietly. No statues smashed, but left in place or simple placed in storage. (I suspect they had a look at what happened in Yorkshire, England at the same time and wanted to avoid anything like that happening in DK.) Some monasteries were closed down but in most the monks and nuns were allowed to remain until they died or left for a Catholic country. 50 years later there were no monks or nuns left. It was a good and humane approach, because many of those monks and nuns were younger daughters and sons of the nobility or nobles who had been retired out or were handicapped.
It did present some problems though. Because the Catholic church ran orphanages, poorhouses and hospitals - now all that all of a sudden was the responsibility of state and that was the start of a national healthcare system, albeit very primitive by today's standard.
150 years later Frederik III succeeded in what had failed for Christian II, he curbed the power of the nobility and introduced Absolutism.
(*) Skipper Klement is to this day a socialist hero and this catching song is about him: