An 82-year-old masked man wielding a machine gun, a knife and a samurai sword was overpowered as he marched towards a meeting of Jehovah's Witnesses, German police have said.

One of the congregation noticed the heavily-armed man approaching and swiftly ushered the 81 fellow worshippers out of an emergency exit of the church building, police in the north-western city of Bielefeld said Friday (local time).

The pensioner entered the now empty building, stayed for a while and then departed, where he was promptly set upon by two of the Jehovah's Witnesses who forced him to the ground until police showed up to arrest him.

Police have begun an investigation into the incident, but no motivation for the man's actions have yet emerged.

- AFP