A tissue sealant for use in surgical and medical procedures for sealing the tissues of a living mammal is provided. The tissue sealant comprises a hydrogel which is formed by gelation of a premix disposed on the tissue to be sealed. The premix comprises alkylated chitosan or a gelatin, and a polybasic carboxylic acid or an oxidized polysaccharide, in an aqueous medium. The premix can also include a dehydrating reagent, a carboxyl activating reagent, or both. A specific use of the tissue sealant is in the repair of the dura mater after brain surgery to prevent leakage of cerebrospinal fluid. The tissue sealant may include a therapeutic or protective agent such as an antibiotic or an anti-inflammatory drug.