In the medieval period, the earliest plays were liturgical dramas, a part of the public religious worship, and performed in churches by clergy. As the guild system developed, it took over theatre performance, producing elaborate cycles of mystery plays that involved many people and took days to perform.