Otto was King of Bavaria from 1886 until 1913. However, he never actively ruled because of alleged severe mental illness. His uncle, Luitpold, and his cousin, Ludwig, served as regents. Ludwig deposed him in 1913, a day after the legislature passed a law allowing him to do so, and became king in his own right as Ludwig III.