 Nevertheless, John was soon in power in Gallura.In 1254, he joined the Republic of Pisa in her attack on John of Cagliari.In 1258, the Republic partitioned the Giudicato of Cagliari amongst her supporters.