The mosque, which is named after the UAE Founding Father, the late Sheikh Zayed bin Sultan Al Nahyan, is a smaller replica of the one in Abu Dhabi.
“I was pleased to join President Joko Widodo in Solo, Indonesia to inaugurate the Sheikh Zayed Grand Mosque,” Sheikh Mohamed, who is in Indonesia for the G20 Summit, said on Twitter.
“Named in honour of the UAE’s Founding Father, the Mosque represents his values of peace and goodwill, reflecting the long-standing ties that exist between our two countries.”
Sheikh Mohamed offered the $20 million building as a gift to Indonesia during his trip to the Muslim country in July 2019.
The replica is almost identical to the original, only smaller, with four minarets and a central dome surrounded by four smaller domes.
The architects have included Indonesian detailing. Local materials were used for construction where possible.
The mosque can house 10,000 worshippers at a time.
The Sheikh Zayed Grand Mosque in Abu Dhabi can accommodate more than 40,000.
The three-hectare plot in central Java also hosts a UAE-sponsored Islamic centre for teaching Indonesian clerics the importance of religious moderation.
In 2020, Sheikh Mohamed directed a mosque to be built in Abu Dhabi’s diplomatic area in honour of the Indonesian president.
He also renamed Al Maarid Street, behind Abu Dhabi National Exhibition Centre, President Joko Widodo Street, in recognition of the leader's role in strengthening ties between the two countries.
The road was inaugurated in October 2020 in a ceremony that coincided with the anniversary of Mr Widodo’s election.
Diplomatic ties between the UAE and Indonesia began in 1976.
The Indonesian embassy opened in Abu Dhabi in October two years later, at the level of charge d’affaires.
Sheikh Zayed visited the South-East Asian country in May 1990, a year before the UAE embassy opened in Jakarta.
Since then there have been frequent state visits between the two countries.
Mr Widodo visited Abu Dhabi in August when he met with Sheikh Mohamed.
The countries signed a Comprehensive Economic Partnership Agreement that is expected to boost bilateral non-oil trade from about $3 billion currently to $10 billion in the next five years.
The agreement covers trade in goods and services, investment, intellectual property rights, Islamic economics, customs procedures and trade facilitation, economic co-operation, small and medium enterprises, digital commerce, as well as legal requirements and institutional issues.