Hakan Fidan comes most recently from the post of head of the Turkish intelligence service, where he has been since 2010. Before that, Fidan was a personal adviser to Erdogan.
"He is a loyal person to Erdogan, one who has long been close to him," says Turkey expert Aras Lindh at the Swedish Institute of International Affairs.
Carl Bildt, who was Sweden's representative at the ceremony, writes on Twitter that he congratulated Hakan Fidan and new Finance Minister Mehmet Simsek for their "new and important positions".
"We know each other from before," Bildt adds.
Sweden's Foreign Minister Tobias Billström (M) also congratulates Hakan Fidan on his new role.
"Looking forward to a good cooperation between Sweden and Turkey," Billström wrote on Twitter.
"Keeping Erdogan's secrets"
Hakan Fidan has sometimes been called Erdogan's right-hand man. Erdogan has previously openly defended Fidan, including during a controversy in 2012 when Fidan was investigated by the Turkish prosecutor general for participating in secret peace talks with the PKK.
Erdogan then came to Fidan's rescue by rewriting the law so that it would require approval from the prime minister to investigate the secret service's agents.
"He keeps my secrets, he guards the secrets of the state," Erdogan said in 2012 about Fidan, according to Al Jazeera.
Hakan Fidan takes over the role of Turkey's foreign minister. He has previously been head of the country's intelligence service. Photo: Necati Savas/EPA/TT
Erdogan is making major changes in the government. Only two ministers will retain their seats, writes the Turkish newspaper Daily Sabah.
Other changes in the government include former Supreme Commander Yasar Güler becoming the new Minister of Defence and Mehmet Simsek becoming the new Minister of Finance.
Learn more about browser support
Carl Bildt: "Erdogan is a rather erratic gentleman" Photo: SVT