The present invention relates to a hydrogel comprising a complex precipitate of a network of charged crosslinked polymers and an oppositely charged peptide, preferably a complex precipitate of a network of crosslinked polyanionic polysaccharide and a cationic oligo- and/or polypeptide. The present invention further relates to a method for preparing hydrogels for forming a complex precipitate of a network of charged crosslinked polymers and an oppositely charged peptide.