Police say the remains are being examined to determine when they may have been buried. [AFP]

Ugandan police arrested a man following the grisly discovery last month of 17 skulls in a shrine west of the capital Kampala, officials said Tuesday.

Shocked villagers unearth the remains, which police at the time said included three children's skulls, on July 28 in an underground chamber in Mpigi town, some 30 km (18 miles) west of Kampala.

"The police crime intelligence squad got a tip-off and they apprehended Lujja Bbosa Tabula on August 19," police spokesman Kituuma Rusoke told AFP on Tuesday, saying he was in custody.

"Tabula was wanted in connection with the human skulls that were found in his residence in Mpigi recently," he said.

Rusoke said Tabula will appear before the court once investigations are concluded. He did not indicate a date for the court appearance.

It remains unclear how the skulls ended up at the site, located on a steep hill, buried within four metallic boxes inside a two metres (seven feet) deep underground chamber.

Local media reported residents as saying that people had previously gathered at the location to worship.

Tabula was also wanted by police in connection to a separate case involving the murder of a prominent traditional Baganda leader, entrepreneur Daniel Bbosa, and had been on the run prior to the discovery of the skulls.

The killing in Kampala was reportedly carried out by hired gunmen as Bbosa returned home from work in February this year.