Police who stopped a cyclist for not wearing a helmet found he had a sawn-off double-barrelled shotgun stuffed down his pants.

Hamilton police said today they were conducting a routine patrol about 12.30am when they noticed a man riding a bike in Fairview Downs and not wearing a helmet.

When they stopped the man a shotgun cartridge fell out of his pocket, Hamilton City Area Commander, Inspector Greg Nicholls said.

The officers found the shotgun shoved down the front of his trousers.

The man told police he had the firearm for protection and had gone out earlier in the evening to test that it worked, Nicholls said.

The man was arrested for unlawfully carrying or possession of a firearm and ammunition and will appear in the Hamilton District Court today.