According to Anadolu Agency, the country’s Mufti Nedzad Grabus led the prayers, attended by hundreds of worshippers.
The mosque was opened in the capital Ljubljana on Monday after surmounting financial hurdles and right-wing opposition, 50 years after the initial request to build was made.
Muslims in the predominantly Catholic Alpine country first filed a request to build a mosque in the late 1960s while Slovenia was still part of the former Communist Yugoslavia.
The community finally received permission 15 years ago, but ran into opposition from right-wing politicians and groups, as well as financial troubles.
Construction, which began in 2013, cost some 34 million euros ($39 million), out of which 28 million euros were Qatari donations, according to Grabus.
Situated in a semi-industrial area of Ljubljana, the mosque, which can hold up to 1,400 people, constitutes the core of the six-building Islamic Cultural Center.
The center also comprises the community's offices; an education center, which includes a library; a restaurant; a basketball court; housing for the Muslim clerisy; and a 40-metre (131 feet) high minaret.
All the buildings are made from white concrete combined with steel, glass and wood. A large blue textile-made dome dominates the mosque's interior, referring to heaven and reminiscent of famous mosques like Istanbul's Blue Mosque.