Animal protection and research are both part of the German Basic Law. Freedom of research is one of the fundamental civil rights (Sec. 5 GG). In 2002, animal protection was included in the Constitution as a national objective (Sec. 20a GG).
There are different regulations and laws regulating the treatment of animals (links lead to German documents):