A suspected petrol bomb exploded outside a Perth mosque as hundreds of worshippers were praying inside.

The attack occurred at the Australian Islamic College mosque at Thornlie, south-east of Perth, at about 8pm on Tuesday night.

Hundreds of worshippers were inside the mosque for their evening prayers when the attack occurred.

It is understood a petrol bomb may have been placed in a parked 4WD outside the mosque before it exploded.

Scroll down for video

A mosque was firebombed at Thornlie, south-east of Perth, at about 8pm on Tuesday night and the words 'f*** Islam' were scrawled on the wall as hundreds of worshippers were inside praying

Several other cars outside the mosque were also targeted.

Footage from the scene shows firefighters working to extinguish a fire in the 4WD parked on the curb.

An anti-Islamic message saying 'f*** Islam' was also scrawled on the mosque wall behind the burning vehicle.

No one was injured in the attack.

WA Police said four vehicles parked outside the mosque and college area were damaged in the attack.

One was completely gutted by fire.

'It is believed an accelerant was used to start the fire,' they said in a statement.

A suspected petrol bomb may have been placed in a parked 4WD outside the mosque. An anti-Islamic message saying 'f*** Islam' had been scrawled on the mosque wall behind the burning vehicle

WA Police said four vehicles parked outside the mosque and college area were damaged in the attack and one was completely gutted by fire

Three people were seen running down an alleyway next to the college after the explosion.

'This, undoubtedly is a criminal act of hate, but it is the act of a person or group not the greater whole,' Yahya Adel Ibrahim from the college said on Facebook.

'Despite what just transpired, everyone stayed to finish their prayers refusing to give into the terror that had just occurred.'

Local Labor MP Chris Tallentire posted a photo on Facebook of himself at the scene.

'Muslim community of Thornlie, I feel sick that you have to endure attacks like this,' he said.

'The truth is that this was an attack on all of us.'

Footage from the scene shows firefighters working to extinguish a fire in the 4WD parked on the curb