Mette Frederiksen, 41, has become Denmark's youngest leader, the third centre-left prime minister to take office in a Nordic country this year.
She presented her minority government to Queen Margrethe II.
Her Social Democrat party ousted the liberals after backing a tougher immigration policy.
In Finland, the Social Democratic Party took office this month, while Sweden's Social Democrat leader returned to power in January.
As she left Amalienborg Palace with her team of 19 ministers, Ms Frederiksen told well-wishers her team was hardworking and diligent and would serve the entire country.
There was some surprise that only seven of the 20 government positions had gone to women. Although Denmark now has 70 women in the 179-member Folketing (parliament), commentators have pointed out that Denmark is the only Nordic country not to have had a parliament with a 40% share of women.
Who is Mette Frederiksen?
A mother of two, she came to power with a traditional centre-left focus on stronger welfare policies but also a promise to be tough on immigration.
Last year she announced plans to place a cap on "non-Western" immigration including refugees and family reunions, to be voted on every year in the Folketing.
She also proposed sending asylum seekers to reception centres outside the EU, for example in North Africa, for their requests to be processed.
Ms Frederiksen was first elected aged 24 and took over the reins of the Social Democrats after Denmark's first woman prime minister, Helle Thorning-Schmidt, lost power in 2015.
Her father, Flemming Frederiksen, is himself a Social Democrat and said last month she had been active in politics since the age of six, seven or eight. "I've never doubted that Mette could go all the way, if she wanted," he told Danish media.
After 19 days of coalition talks she decided to rule with other left and centre-left parties in a minority government.
Have all the Nordic countries veered left?
All of them are now led by the centre-left except Norway, where a coalition led by Conservative Prime Minister Erna Solberg has been in power since 2013.
Unlike Finland and Denmark, which have seen new left-run governments take power this month, Sweden has had a centre-left government in place over the past four years.
And yet, Stefan Lofven's Social Democrat-led administration is not in a strong position. Elections last September left Sweden with 131 days of political stalemate and Mr Lofven had to make concessions to the Centre and Liberals to get back in power.
In Finland, the Social Democrats won April elections, just ahead of the nationalist Finns Party. So Juha Sipila's centre-right government was ousted.
Prime Minister Antti Rinne is leading a coalition with the Centre, Greens and two other parties.
In Iceland, a left-green coalition took power in 2017, led by Katrin Jakobsdottir, even though her party came second in the election.