Police were called at 04:33hrs on Monday, 3 June to a mosque in Hayes Road, Southall, following reports of a man armed with a hammer.
A 38-year-old man is reported to have attempted to attack people.
He was detained by worshippers prior to police arrival.
He has subsequently been arrested on suspicion of attempted GBH and is in custody at a west London police station.
There are no reports of any injuries.
The incident is not being treated as terror-related. It is believed the man may have been involved in a dispute with people who he believed to have been attendees from the mosque the previous day.
Officers remain at the scene. Enquiries continue.