After years of attempting to build a mosque in the heartland of Sydney's western suburbs, Blacktown Mosque has finally opened its doors.

The mosque has taken 15 years to build because of financial constraints and council issues such as community objections about noise and traffic.

The land for the mosque was purchased in 1998.

More than 3,000 people packed the mosque at the opening on Saturday, which will be open to people of all different faiths and backgrounds.

Sharif Amin from the Afghan Association of New South Wales says he particularly hopes the mosque will be able to reach out to troubled young people in the Blacktown area.

Mr Amin says the mosque will provide a platform for the wider community to engage with young people.

"The mosque will be a place for troubled youth off the streets to liaise with others, to talk with them," he said.

"So that they can feel a sense of belonging, a place where they can be heard, where they can become involved with other activities."

Mr Amin says now more than ever community support is needed for young people.

"With unemployment figures rising and an increase in gang activity, it's crucial that young people have a support system, where they can go to for help," he said.

"If we don't address these issues early on than we'll have to deal with more crime in our community."

He says the mosque will mainly be used as a place of worship for the Muslim community but it will also run a number of religious classes and youth events.

"It welcomes everyone, from all walks of life, whether its summer or winter, requiring no application, no formal permission," he said.

"It does not turn away anyone, whether they are young or male or female, Muslim or non-Muslim, black or white, entry into the mosque does not require any fee, everyone is welcome."

Funding had to be raised from the local Afghan community in Sydney and interstate to complete the building, which is worth just over $3 million.