A defendant in a suit in equity may, in his answer, allege any new matter constituting a claim for affirmative relief in such suit against the plaintiff or any defendant therein, in the same manner and with like effect as if the same had been alleged in a crossbill filed by him therein; and in such case, if the plaintiff or defendant against whom such relief is claimed desire to controvert the relief prayed for in the answer, he shall file a special reply in writing, denying such allegations of such answer as he does not admit to be true, and stating any facts constituting a defense thereto. But in case a defendant allege new matter in his answer upon which he relies for and prays affirmative relief, such defendant shall not file a crossbill in the same cause except upon condition of striking from his answer all such matter and prayer for affirmative relief as are contained in such crossbill.