If the complaint sets out an action on contract then the counterclaim may be litigated in this action .under- subdivision 2. of section .501 of the Code. If, on the contrary, it is in tort the judgment must be reversed. The complaint alleges the title to the personal property in the plaintiff under a promise by defendant to deliver it upon demand. Demand was made and refused. It is clearly a case where possession by the defendant until demand made was rightful, but the detention after demand is wrongful, and it amounted to a conversion át the election of the plaintiff. The title to the personal property in question is placed in the plaintiff by the allegations of the complaint, with the right of possession upon demand. It must be apparent that a refusal to surrender possession as an incident to the title constituted conversion.
*777The interlocutory judgment should he reversed, with costs, and demurrer sustained, with costs, with leave to defendant to amend within twenty days after entry of order and payment of costs.
Patterson, P. J., McLaughlin, Houghton and Scott, JJ., concurred.
Judgment reversed, with costs, and demurrer sustained, with costs, with leave to defendant to amend on payment of costs in this court and in the court below.