The term "fuga" was used as far back as the Middle Ages, but was initially used to refer to any kind of imitative counterpoint, including canons, which are now thought of as distinct from fugues. Prior to the 16th century, fugue was originally a genre. It was not until the 16th century that fugal technique as it is understood today began to be seen in pieces, both instrumental and vocal. Fugal writing is found in works such as fantasias, ricercares and canzonas.