A viscous fluid produced and secreted by mucous membranes and glands that lubricates and protects associated tissues.