Frederick William II ( ; ( 25 September 1744 â `` 16 November 1797 ) was the fourth King of Prussia . He ruled from 1786 until his death . Frederick William II ( ; 25 September 1744 -- 16 November 1797 ) was the King of Prussia , reigning from 1786 until his death .