Occupants of a car shouted “ISIS will live forever” and “we’ll kill you” at an Islamic prayer centre in Sydney's southwest just hours before a man was shot outside early this morning.

The 47-year-old and his wife and children were leaving the prayer room on Rosedale Avenue, Greenacre about 1.15am when he was shot at by a person in a passing car.

He suffered pellet wounds to his face and shoulder during the attack.

Witnesses have told 9NEWS that earlier in the evening a car drove past the centre and the occupants yelled threats and then returned a short time later to make more threats.

"They drive past and they made the threat 'ISIS will live forever', this and that, 'you Shia dogs' and then they drove off," one witness said.

"About 11-11.30 they made the same threat, then they said they were going to come back and 'we'll kill you, shoot you'."

It is unknown if the same car was involved in both incidents.

The injured man, who worked at the prayer centre, was dragged off the street and into the walled prayer hall, where members performed first aid until paramedics arrived.

Police are yet to speak with the injured man, but it is believed his family and children witnessed the shooting.

A police spokeswoman said he is expected to undergo surgery later today but refused to reveal what hospital the man had been taken to for his safety.

His injuries are not believed to be life threatening.

The prayer hall was opened on Rosedale Avenue in 2004 and is located in a largely industrial area that includes several smash repair businesses and wrecking yards.

The area remains cordoned off by police who are still searching the scene.

Specialist firearm detection dogs have also been used to search the surrounding area, including the grounds of the Islamic centre.

Members who turned up for prayers this morning were confronted by the crime scene and police vehicles.

Detectives have appealed for any witnesses to the shooting to come forward and are still unsure what led to the attack.

"At this point in time it does not appear that there is any type of motivation for the shooting," Inspector Dave Firth said.

“We are following several lines of inquiry.”

Police were unable to confirm the reported threats.

Anthony Brims who works on the street said it was usually “a quiet neighbourhood, a good neighbourhood”.