King Frederick William III of Prussia changed this to imprisonment for thirty years .
This sentence was commuted by King Frederick William III of Prussia to imprisonment for thirty years in a Prussian fortress .