The consolidation of the Lithuanian lands began in the late 12th century. Mindaugas, the first ruler of the Grand Duchy, was crowned as Catholic King of Lithuania in 1253. The pagan state was targeted in the religious crusade by the Teutonic Knights and the Livonian Order. The rapid territorial expansion started at the late reign of Gediminas and continued to expand under the diarchy and co-leadership of his sons Algirdas and Kęstutis. Algirdas's son Jogaila signed the Union of Krewo in 1386, bringing two major changes in the history of the Grand Duchy of Lithuania: conversion to Christianity and establishment of a dynastic union between the Grand Duchy of Lithuania and the Crown of the Kingdom of Poland.