
230 Minn. 303 (1950)
A & A CREDIT COMPANY
v.
GORDON BERQUIST AND OTHERS.[1]
No. 35,155.
Supreme Court of Minnesota.
February 17, 1950.
W.L. Hursh and O'Neill J. Grathwol, for relators.
Benjamin Peilen, for respondent.
LORING, CHIEF JUSTICE.
This is a mandamus proceeding in this court to compel a change of venue in an action for claim and delivery of an automobile from Ramsey county to Hennepin county. The car was sold on an installment contract by plaintiff-respondent, which, under M.S.A. 542.09, is a resident of Ramsey county. There was an alleged default, a demand for possession, and a refusal thereof by defendants-relators, who are in possession in Hennepin county, where they reside. The district court of Ramsey county refused to grant defendants' demand for a change of venue to Hennepin county. Thereafter, relators secured from this court an alternative writ of mandamus.
M.S.A. 542.06 provides:
*304 "Actions to recover the possession of personal property wrongfully taken shall be tried in the county in which the taking occurred, or, at plaintiff's election, in the county in which he resides; in other cases in the county in which the property is situated."[2]
Relators contend that, since the original taking of possession of the property involved in this case was not wrongful, respondent *305 does not have an election under the provisions of § 542.06 to retain the venue.
Originally, at common law, the writ of replevin was a legal procedure to try the legality of a distress where the property was wrongfully taken. Morris, Replevin (3 ed.) p. 51. The gist of the action was taking from plaintiff's possession under a claim of dominion. Ames, Lectures on Legal History, p. 64. The complaint was for the wrongful taking and detention. Later, the writ developed into an action to try the wrongful taking and detention of a chattel in cases besides distress, but, with few exceptions, the action did not extend to cases of mere wrongful detention. Shinn, Replevin, § 292; Morgan, The Study of Law, p. 62. Replevin in the cepit was for the wrongful taking, and the common-law action of detinue was for the wrongful detention, regardless of the means by which defendant's possession was acquired. Morgan, The Study of Law, p. 68; see, Wells, Replevin (2 ed.) § 53.
Before the code, the view of the court in Minnesota was that replevin would not lie unless the declaration alleged a wrongful or illegal taking or a wrongful taking and detention. See, Coit v. Waples, 1 Minn. 110 (134). Where the declaration was for replevin in the cepit, the general issue was non cepit, and the gist of the action was the taking and not title to the property. Barrett v. Warren, 3 Hill (N.Y.) 348. In Coit v. Waples, supra, the court also points out that the Wisconsin statute then in force in the territory of Minnesota gave the action of replevin in two distinct cases: (1) Replevin in the cepit, which did not put in issue the title; and (2) where the wrongful detention only and not the wrongful taking was complained of. The latter replaced the common-law action of detinue and put in issue the title. See, Shinn, Replevin, §§ 285-287.
The two distinct types of actions no longer exist in Minnesota. The code replaced them with the action for claim and delivery of personal property.[3] R.S. 1851, c. 70, §§ 122, 123. The gist of the *306 action of replevin under the code is "to determine the right of possession of personal property or the title thereto." Republic State Co. v. Brown, 158 Minn. 396, 399, 197 N.W. 840, 841; O'Brien v. Curry & Whyte, 111 Minn. 533, 536, 127 N.W. 411, 412, 137 A.S.R. 563; see, Oleson v. Newell, 12 Minn. 114 (186); Heiser v. Severy, 117 Mont. 105, 115, 158 P. (2d) 501, 505, 160 A.L.R. 319. Thus, if the plaintiff seeks a return of the property, he is required to state in his affidavit that "the property is wrongfully detained by the defendant," not that it was wrongfully taken. M.S.A. 565.02(2).
Since the purpose of the action under the code is to determine the right of possession or title to the property, relators' construction of § 542.06 would change the nature of the action. If, as relators contend, respondent must allege and prove a wrongful taking, the gist of the action is twofold: the wrongful taking and the detention[4]; yet this was not the intention of the code. See, Shinn, Replevin, § 444(b).
*307 A further difficulty with relators' contention is that we have held that where a defendant rightfully comes into possession of the chattel in the first instance, but subsequently unlawfully detains it, there is a conversion, which is the equivalent of an original wrongful taking. In Guthrie v. Olson, 44 Minn. 404, 405, 46 N.W. 853, where the "evidence tended to show that, although defendant's possession was rightful in its inception, yet he had subsequently wrongfully converted it to his own use," the court, speaking through Mr. Justice Mitchell, said (44 Minn. 405, 46 N.W. 853):
"* * * But where the defendant's possession was acquired wrongfully, or where, although it was rightful in its inception, he has subsequently wrongfully converted it to his own use, which is equivalent to an original wrongful taking, the law presumes that he remains in the same state of mind in which he committed the wrongful taking or wrongful conversion, and hence would not have surrendered the property even if a demand had been made." (Italics supplied.)
See, also, Wells, Replevin (2 ed.) §§ 344, et seq.; Baker v. Fales, 16 Mass. 147, 150.
While the Guthrie case involved the necessity of demand, it determined (without passing upon the issue of damages) that the effect of the subsequent illegal detention was the equivalent of a wrongful taking as an element of the cause of action. Therefore, the action based on detention after demand is claim and delivery for property "wrongfully taken." That interpretation has stood for 60 years. Consequently, the proper interpretation of § 542.06 does not deny respondent the right to elect to bring and maintain the action in the county of his residence. Since, in cases where the original acquisition of possession by defendant is lawful the subsequent demand and refusal to return the property by defendant amounts, in the eyes of the law, to a wrongful taking, the respondent *308 still falls within the terms of the statute which provides for the venue, "at plaintiff's election, in the county in which he resides." Apparently, the legislature intended that in claim and delivery the plaintiff whose possession is challenged should have the advantages usually accruing to a defendant in the matter of venue.
Writ discharged.
NOTES
[1]  Reported in 41 N.W. (2d) 582.
[2]  This statute is a combination of parts of G.S. 1894, c. 66, Title 4, §§ 5182 and 5185. See, R.L. 1905, c. 77, § 4092.

Section 5182, entitled "What actions to be tried in county where subject is situated," provided:
"Actions for the following causes shall be tried in the county in which the subject of the action, or some part thereof, is situated, subject to the power of the court to change the place of trial as hereinafter provided:
* * * * *
"Fourth.  For the recovery of personal property detained for any cause." Prior to the amendment of L. 1876, c. 51, § 1, the common-law word "distrained" was used instead of "detained." See, Dutcher v. Culver, 24 Minn. 584, 588-589.
Section 5185, entitled "Other actions, where triable  Replevin  Change of venue  Corporations," provided:
"In all other cases, except when the state of Minnesota is plaintiff, the action shall be tried in the county in which the defendants, or any of them, shall reside at the commencement of the action; or if none of the parties shall reside or be found in the state, or the defendant be a foreign corporation, the same may be tried in any county which the plaintiff shall designate in his complaint, subject, however, to the power of the court to change the place of trial, in the cases provided by law. If the county designated for that purpose in the complaint be not the proper county, the action may, notwithstanding, be tried therein, unless the defendant, before the time for answering expires, demand in writing that the trial be had in the proper county, and the place of trial shall be thereupon changed to the proper county, by the order of the court, unless the parties consent thereto: provided, that in an action for the claim and delivery of personal property wrongfully taken, the action may be brought and maintained in the county where the wrongful taking occurred, or where the plaintiff resides."
This proviso came into the law by L. 1877, c. 68, § 1, which amended G.S. 1866, c. 66, § 40, as amended by L. 1876, c, 48, § 1. See, Leonard v. Maginnis, 34 Minn. 506, 508, 26 N.W. 733, 734-735.
[3]  Shinn, Replevin, § 54, states:

"`Claim and Delivery,' sometimes called the action of Claim and Delivery is in most of the code states made a substitute for the action of Replevin as it existed before the adoption of `Codes of Procedure.' It does not require all the conditions to sustain it that were required by the common law action of Replevin, but its required conditions are practically the same as that of a modernized action of Replevin which requires only an unlawful detention and is therefore more nearer like the common law action of Detinue."
In § 292, Shinn states:
"* * * The gist of the action is simply the wrongful detention (at the time the suit was begun) by the defendant of the plaintiff's property, and not the wrongful taking. It is the wrongful detention which gives the right of action and this without any regard whatever to the manner in which the possession was acquired. It is a substitute for the common law action of Detinue and will lie in all cases where the plaintiff has a present right to the possession of any personal property in the possession of the defendant." (Italics supplied.)
[4]  Shinn, Replevin, § 335, states that if the statute requires that the affidavit provide that the property was wrongfully taken, the affidavit is fatally defective when this requirement is not complied with. The reason for the rule is that such an allegation is necessary to give the court jurisdiction. He declares:

"Wherever the gist of the action is the unlawful detention of the property, there must be an averment that the defendant wrongfully detains the same; and whenever the gist of the action is the wrongful taking, there must be an averment of the same upon oath, or the proceedings will be jurisdictionally defective."
