The new building in the Athens industrial district of Votanikos will serve the capital's some 500,000-strong Muslim community, which had been lobbying the government for decades.
Its construction had been riddled with controversy, including the change of locations due to protests by local residents who didn't want it in their neighborhoods, and opposition by Greek Orthodox clerics and nationalists.
The official Greek Orthodox church had not opposed it, although it had expressed reservations.
"It is a historic moment for the Muslim community living in Athens, we have been waiting for this mosque for so long , since the first law was passed in 2006... thanks to God finally we have a mosque which is open and we can pray here freely," said Heider Ashir, member of the mosque's governing council.
Athens is the only European Union capital without an official mosque. The only mosque in Greece exists in the northern border city of Thrace, near Turkey, home to a Muslim community.