The ensuing civil war, also known as the Fetret Devri, lasted from 1402 to 1413 as Bayezid's sons fought over succession. It ended when Mehmed I emerged as the sultan and restored Ottoman power.