BERLIN — Who knew that buccaneers had bookkeepers?

The authorities in Germany said Monday that they had arrested a man, identifying him only by the initial “M,” who had acted as the accountant for a band of Somali pirates who hijacked a German oil tanker three years ago.

The man, who “partially confessed,” according to a police statement, is believed to have been responsible for “the bookkeeping, which was the basis for the proportional division of the ransom between the participating pirates.” He faces a potential prison sentence of 5 to 15 years on charges of kidnapping and grievous bodily harm.

“This is another outstanding and international success against sea piracy,” Uwe Kolmey, the president of the state police in Lower Saxony, said in the statement. He singled out the investigators for their “meticulous search for evidence” on the tanker after the ordeal.

The suspect, arrested Wednesday, was initially found with false travel documents at a refugee center in the city of Giessen, the authorities said. His fingerprints, they said, matched prints collected on the ship, the Marida Marguerite.