German officials and members of the Ahmadiyah community gathered on Thursday for the ceremony at the Heinersdorf mosque, north of the capital, under police protection.
The edifice symbolises "religious and cultural tolerance in our town," said Berlin mayor Klaus Wowereit, who was among some 300 people attending the gathering.
The €1.6 million ($2.15 million) mosque has a 12-metre (39-foot) high minaret and can hold up to 500 worshippers -- far larger than Berlin's 200-strong Ahmadiyah community which financed its construction.
The building of mosques and minarets has sparked controversy in Europe, with opponents criticizing growing Muslim influence in the region and foreign funding that sometimes bankrolls the construction. Opponents of the Heinersdorf mosque had called for a protest against its inauguration, and a petition against its construction gathered some 20,000 signatures.
"The majority of Heinersdorf residents" opposed the mosque, said a local citizens' group, Iphab, which organized the petition.
Plans for another mosque in Cologne have been on the cards for more than a year, with the project becoming a lightning rod for far-right groups in particular.