Jacob and Wilhelm Grimm were born during the 1780s in Hanau, Germany, and studied law at Marburg university. After leaving education, they worked as diplomats and librarians in Kassel. In 1837 they were dismissed from their professorships at the University of Göttingen for refusing to swear allegiance to the new King of Hanover, but were later invited to join the Academy in Berlin, by Frederick William IV of Prussia, where they remained for the rest of their lives. Individually, and as a collaborative team, the brothers were two of the greatest scholars that Germany has produced. Aside from their folktales, they produced many different volumes of research, as well as anthologies of verse and song, and two of Germany's most important linguistic texts, the Deutsche Grammatik (German grammar) and the Deutsche Wörterbuch (German dictionary). Wilhelm died in 1859, at the age of 73, and Jacob died in 1863, at the age of 78.