Torra was elected to the Parliament of Catalonia at the 2017 regional election as an independent candidate for the pro-independence Junts per Catalunya electoral alliance. In May 2018 he was elected 131 President of Catalonia after the Spanish courts blocked three other candidates.