William IV became king of The United Kingdom and Hanover until his death in 1837.

Source