The ancient word, 'matsuri' or 'matsuru' (both means worship) in Japanese, came first, and thereafter, due to inflow of Chinese characters, characters such as '祭り,' '奉り' (dedication), '祀り' (worship), '政り' (ruling), '纏り' (organizing) and so on were allocated.
「まつり」や「まつる」という古語が先であり、その後、漢字の流入により「祭り」・「奉り」・「祀り」・「政り」・「纏り」などの文字が充てられた。