After the Chinese tradition that diseases (malaria fever) can be avoided by eating sakubei on the day of the Tanabata festival, sakubei was taken to Tanabata events in the court during the Heian period.
平安時代には七夕に索餅を食べると病（マラリア性の熱病）に罹らないという中国の故事に倣って宮廷での七夕行事に索餅が取り入れられていた。