(dee-mur-ur) A written response to a complaint filed in a lawsuit which, in effect, pleads for dismissal on the point that even if the facts alleged in the complaint were true, there is no legal basis for a lawsuit. A hearing before a judge will then be held to determine the validity of the demurrer. Some parts of a lawsuit may be defeated by a demurrer while others may survive. Some demurrers contend that the complaint is unclear or omits an essential element of fact. If the judge finds these errors, the judge will usually sustain the demurrer (state it is valid), but "with leave to amend" in order to correct the original complaint. If after amendment the complaint is still not legally good, a demurrer will be granted. In rare occasions, a demurrer can be used to attack an answer to a complaint. Some states have substituted a motion to dismiss for failure to state a cause of action for the demurrer.