The music of Brazil was formed mainly from the fusion of European and African elements. Until the nineteenth century, Portugal was the gateway to most of the influences that built Brazilian music, although many of these elements were not of Portuguese origin, but generally European. The first was José Maurício Nunes Garcia, author of sacred pieces with influence of Viennese classicism. The major contribution of the African element was the rhythmic diversity and some dances and instruments that had a bigger role in the development of popular music and folk, flourishing especially in the twentieth century.