Haney, J.
This is an action for the foreclosure of a real estate mortgage. Defendants appeal from an order appointing a receiver. The order was made upon the complaint, answer, and numerous affidavits read by the respective parties. It is alleged in the com*326plaint that on December 8, 1896, and for many years immediately preceding that date, the record title to certain realty was in M. D. P, Parker, although one Kendall Parker was the actual owner thereof; that about April 1, 1887, M. D. P. Parker and wife made a mortgage on such realty, to secure the payment of $400; that this mortgage was made at the request, and for the benefit of Kendall Parker; that in 1887 M. D. P. Parker gave Kendall Parker a power of attorney, which purported to authorize the latter, in the name of the former, to grant, bargain and sell all the real property of M. D. P. Parker in Yankton county, and to deliver good and sufficient deeds thereof, and to do certain other things, which power of attorney was recorded April 21, 1887; that on January 22, 1891, Kendall Parker, claiming to act as attorney in fact, and believing that the aforesaid power of attorney showed sufficient authority therefor, executed and delivered in the name of M. D. P. Parker, by Kendall Parker, his attorney in fact, to John W. Veazie, a promissory note for $600, payable January 22, 1896, with interest at the rate of 8 per cent per annum ; that when this note was executed the sum of $450 was due on the debt secured by the first mentioned mortgage, and it was ex-presly agreed that the $600 should be applied by Veazie to the satisfaction of the former mortgage, which was done (the satisfaction of such mortgage having been recorded March 4, 1891, and the balance of the $600 having been paid to Kendall Parker, who used the same for his sole benefit) ; that in pursuance of this agreement a mortgage upon the realty in controversy was made by Kendall Parker, as attorney in fact, to secure the $600 loan received of Veazie, which mortgage was recorded March 4, 1891; that subsequently Veazie died, and his note and mortgage were lawfully transferred to this plaintiff, who is the owner and holder thereof (the assignment of the mortgage to plaintiff having been recorded December 3, 1895); *327that on the 8th day of December, 1896, the said Kendall Parker, claiming to act as attorney in fact of said M. D. R. Parker, executed and delivered to the defendant Kendall T. Parker a warranty deed purporting to convey to the defendants, Kendall TR Parker and Prank W. Parker, the lands hereinbefore described; that said deed contained the following language; “And the said M. D. R. Parker, for himself and his heirs, executors, and administrators, does covenant and agree to and with the said parties of the secbnd part, their heirs and assigns that he is well seised in fee of the lands and premises aforesaid, and has good right and lawful authority to sell and convey the same in manner and form aforesaid, and that the same are free from all. incumbrances whatsoever, excepting a mortgage of six hundred dollars, which second parties hereby assume;” that at the time of the execution of said deed there was no mortgage in existence on said land, except the one hereinbefore described, executed by the said Kendall Parker, claiming to act as attorney in fact of said M. D. R. Parker, to the said John W. Veazie; that no part of the sum secured by the Veazie mortgage has been paid, except the interest which became due Janutry 21, 1892 and January 21, 1893. In addition to the relief usually demanded in foreclosure actions, the plaintiff prays that in case it shall be held that the mortgage sued on was executed by Kendall Parker without authority, and that defendants are not liable thereon, the former mortgage may be revived, and plaintiff decreed to be the equitable assignee thereof, and that the mortgaged premises be ordered sold to satisfy the same, with interest, costs, etc. Defendants admit in their answer that on December 8, 1896, and for many years preceding that date, record title to the mortgaged premises was in M. D. R. Parker. They admit the execution, satisfaction, and discharge of the $400 mortgage. They admit the recording of the $600 mortgage. All other allegations *328of the complaint are denied. And they allege that on the 9th day of July, A. D. 1897, and for a long time prior thereto, the said M. D. R. Parker was the owner in fee sumple of the lands and premises de- , scribed in the amended complaint, free from all incumbrances, and he was in the actual possession thereof; that the defendant Kendall T. Parker, believing such to be the fact, and relying thereon, on or about that day agreed with the said M. D. R. Parker, through the said Kendall 'Parker, under the power and authority vested in him by the said power of attorney mentioned in the third paragraph of the plaintiff’s amended complaint, for the purchase of said lands in fee simple for the price of $650, including services rendered and to he rendered, whereupon the said M. D. R. Parker, by the said Kendall Parker, ' his attorney in fact, conveyed the said premises, among other lands, to the defendant Kendall T: Parker, by his deed dated on or about the 9th day of July, A. D. 1897, and the said premises were in fact free and clear from all incumbrances whatsoever; that said services were actually rendered and said sum of $650 was actually paid by the defendant Kendall T. Parker to said Kendall Parker, the attorney in "fact of said M. D. R. Parker, and for him, the said M. D. R. Parker, and on his behalf, at or before the time of the execution and delivery of said deed; that the defendant Kendall T. Parker had not at or before the time of the said conveyance, or of the said payment of the purchase money, any notice whatever, either express or implied, of the said alleged mortgage to the said Veazie, now claimed by the plaintiff, or of any other incumbrance whatsoever that affected the said premises. The issues raised by the pleadings are thus stated merely for the purpose of this appeal, without intending to preclude a more precise construction should the action be heard upon its merits. The affidavits read on behalf of the plaintiff in support of the motion to appoint a receiver tend to prove that a portion of the mort*329gaged realty has been washed away by the Missouri river, that there is danger of more of it being thus removed, and that the value of the remaining portion does not exceed $650. The affidavits read on behalf of the defendants in opposition to the motion tend to prove that the premises have not been seriously affected by the river, that they are not in danger of being injured thereby, that there are certain valuable improvements thereon, that the value of the realty is not less than $1,300, and that the defendant Kendall T. Parker is solvent. Thus we have an action to foreclose a mortgage upon real property, the validity of which is contested, the conditions of which have not been performed, and an issue as to the value of the mortgaged prop. ■ erty.
The first inquiry demanding attention is whether a receiver can be appointed in any foreclosure action under the laws of this state. It is provided in the Civil Code that “a mortgage does not en title the mortgagee to the possission of the property unless authorized by the express terms of the mortgage.” Comp. Laws, § 4358. “Notwithstanding an agreement to the contrary, a lien or a contract for a lien transfers no title to the property subject to the lien.” Comp. Laws, §4330. The Code of Civil Procedure contains the following: “A receiver may be appointed by the court in which an action is pending, or by the judge thereof: * * * (2) In an action by a mortgagee for the foreclosure of his mortgage, and sale of the mortgaged property where it appears that the mortgaged property is in danger of being lost, removed or materially injured, or that the conditions of the mortgage have not been performed, and that the property is probably insufficient to discharge the mortgage debt.” Comp. Laws, § 5015. For the purposes of construction the several Codes passed in 1877 must be held and deemed to have been passed on the same day, and as parts of the same statute. Rev. Code 1877, *330p. 940, § 16. If the provisions of any code conflict with or contravene the provisions of any other code, the provisions of each Code must prevail as to all matters and questions arising thereunder out of the same subject matter. Id. p. 940, § 17. Such is the rule of construction'established by the legislature itself. Under it there can be no doubt of the court’s authority to appoint a receiver in an action by a mortgagee, his successor in interest, or his assignee, for the foreclosure of his mortgage and sale of the mortgaged property, where it appears that the conditions of the mortgage have not been performed, and that the property is probably insufficient to discharge the mortgage debt. In view of these plain statutory provisions, there is no occasion to consult the case law of other jurisdictions. The power to appoint receivers in foreclosure actions is clearly conferred by the statute. The former adjudications of this court respecting the mortgagor’s right of possession prior to the expiration of the period of redemption do not conflict with the conclusions reached on this appeal. Wood v. Conrad, 2 S. D. 405, 50 N. W. 903; Rudolph v. Herman, 4 S. D. 283, 56 N. W. 901; Siems v. Bank, 7 S. D. 338, 64 N. W. 167. It may seem inconsistent that a mortgagee, can, by means of a receiver, interfere with the rents and profits of mortgaged premises to the possession of which he is not entitled. But such, we understand, is the law in this state, and when effect is given to all parts of the statute the result is really not unreasonable. The mortgagee may not interfere with the rents and profits prior to the expiration of the period of redemption, except where he has commenced an acción for the foreclosure of his mortgage and sale of the mortgaged property, and certain specified conditions prevail, which authorize the court to control the rents and profits for his benefit by means of a receiver. Manifestly, this is an action for the foreclosure of a mortgage, the conditions of which have not been performed. Its val*331idity is disputed, but that is a question to be determined upon the trial of the action. The application for a receiver involved only one inquiry not determined by the pleadings, namely, was the property probably insufficient to discharge the mortgage debt? In deciding that question the trial judge was required to exercise a sound legal discretion. He' should have considered the amount of the debt, the rate of interest it bore, the character and probable duration of the litigation, the character and probable future value of the property, and have decided whether it would probably be sufficient to satisfy the plainttiff’s claim, with interest and costs, when the litigation should be closed and the property sold. We cannot say that the learned circuit judge,, in the performance of this duty either abused his discretion or erred in judgment.
The insolvency of the mortgagor, or of those who have assumed the payment of the mortgage, was not material, because the statute does not make insolvency a prerequisite condition to the appointment of a receiver. A court might be justified in refusing to appoint a receiver where the debt was amply secured independently of the mortgage, but, under the statute heretofore quoted, it is clearly not reversible error to appoint a receiver, simply because the mortgagor or his transferees are solvent. The order appealed from is affirmed.