Answer
Jerusalem was claimed by Charles in 1277 due to his marriage to Mary, daughter of King Stephen V of Hungary. As Mary's dowry included the rights to the Kingdom of Jerusalem, Charles acquired a claim to the throne. However, his hold on the kingdom remained largely symbolic as he never personally ruled or resided in Jerusalem.