German police have arrested the administrator of a darknet website that was allegedly used by mass murderer David Ali Sonboly.

Sonboly, 18, killed nine people and injured an additional 35 people when he opened fire in a McDonald's restaurant in Munich before storming the nearby Olympia shopping centre across the street on the evening of 22 July.

The killer fatally shot himself at the end of his shocking killing spree after yelling anti-foreigner slurs, despite having Iranian parents.

Investigators believe Sonboly was influenced by far-right politics. The killings came on the fifth anniversary of the 2011 massacre on the Norweigan island of Utøya committed by far-right extremist Anders Breivik.

Sonboly's gun, a Glock pistol, was the same type of weapon used by Breivik during the killings. Police have now arrested a 31-year-old man believed to be the sole administrator of the so-called dark web site, where drugs and firearms were sold.

The dark web can be accessed using special software, such as Tor, allowing users and website operators to remain anonymous.

These sites have been used for all sorts of illegal enterprises, from selling drugs to illegal pornographic material, or for hackers to communicate.

Sonboly, who had been in psychiatric care prior to the massacre, was reported to have had 300 bullets in his backpack at the time of the shooting, with police suspecting the site may have been used to supply these too.

Due to strict laws about identification, German police have not named the suspect who was arrested on 8 June. Authorities have identified and seized the server that is used to host the allegedly illegal site.

Muncih shopping centre
Police secures the area inside a shopping mall (the Olympia Einkaufzentrum (OEZ) ) in Munich on 22 July 2016 following a shooting AFP/ Getty Images

The man German authorities suspected of selling Sonboly the firearm was arrested in August 2016, after catching him in a sting operation, Sky News reported. The 31-year-old was believed to have met Sonboly twice, initially to sell him the gun used and then bullets just four days before the attack.