
2 Cal.2d 17 (1934)
T. H. CARLON, Petitioner,
v.
THE SUPERIOR COURT OF MERCED COUNTY, J. G. RUDDLE PROPERTIES, INC., et al., Respondents.
S. F. No. 15162. 
Supreme Court of California. In Bank.  
November 28, 1934.
 James F. Peck for Petitioner.
 F. M. Ostrander for Respondents.
 PRESTON, J.
 Petition for certiorari. Two questions are presented by this record--one of substantive right and the other of procedure.
 The first is the right of petitioner, as junior mortgagee of certain property, to the rents, issues and profits thereof, in the hands of a receiver appointed at his request in a foreclosure proceeding begun by him, to which the senior mortgagee was made a party but stood indifferent at the time said receiver was appointed, taking no step then or thereafter to have the receivership inure to its benefit.
 The second is the propriety of the writ of certiorari to annul an order made in said proceeding awarding these funds to the senior mortgagee, who in the meantime had instituted an independent foreclosure proceeding, conducted a sale thereunder, and obtained a deficiency judgment, which remains unsatisfied.
 The facts are: Petitioner instituted in the Superior Court of the County of Merced, on March 22, 1926, an action against the Ruddle Properties, Inc., to foreclose a junior mortgage in the sum of $23,086.54. The respondent Security First National Bank of Los Angeles, a corporation, in the name of its predecessor, was named as a defendant and answered asserting the priority of its mortgage but asking no further relief. The court, on application of petitioner, appointed a receiver for the rents, issues and profits of the mortgaged property. The bank neither assented to nor *19 protested against this action and it took no steps to have the receivership cover a prospective lack of security as to it.
 The receiver took possession of said property and continued in possession thereof until a few weeks subsequent to January 17, 1931, during which time he accumulated and had on hand the sum of $14,320.30. But following the action instituted by petitioner, respondent bank, on July 30, 1926, instituted against the mortgagor an independent action to foreclose its first mortgage, making petitioner a party thereto, but not asking for a receivership or for any relief against the receivership which had theretofore existed. This action was pursued to judgment; the amount of the claim of respondent bank was fixed, together with the amount of petitioner's claim as junior mortgagee.
 Thereafter, and on said January 17, 1931, the property was sold at foreclosure sale under proceedings in said action of the senior mortgagee and, the property failing to bring the amount of its claim, a deficiency judgment in the sum of $178,744.38 was entered against said mortgagor. Following the sale the receiver surrendered possession of the property but retained and still retains said above-mentioned funds in his hands. However, he was discharged as such receiver on February 10, 1932.
 Thereafter, and on September 27, 1933, the respondent bank moved the court in the action begun by petitioner for an order requiring the receiver to pay all said moneys and turn over all property remaining in his hands to it. Said motion was made upon the ground that said bank was entitled to the distribution to it of all funds and money remaining in the hands of said receiver and it was heard upon the records in said cause and also upon the records in the cause instituted by said bank for foreclosure of its mortgage. It was resisted by petitioner, who filed the supporting affidavit of James F. Peck.
 Thereafter, and on April 3, 1934, the court in said action settled the account of said receiver and found that he had on hand in cash said sum of $14,320.30, together with certain personal property not necessary to here describe. On the same day the court gave a second order requiring said receiver to turn over said money and said personal property to respondent bank, together with interest on said sum from and after the date of the order. It is the validity of this *20 last-mentioned order that petitioner here questions by this proceeding for certiorari. Respondent, however, contends not only that the order is valid and binding but that it may not be reviewed in any other manner than by appeal.
 [1] The rule of law applicable to such a state of facts has had the attention of text writers and the courts of other jurisdictions. While there is some apparent conflict in the holdings, upon examination it seems to be more apparent than real.
 For example, Mr. Wiltsie on Mortgage Foreclosure, 4th ed., vol. 1, sec. 580, pp. 751, 752, citing Miltenberger v. Logansport, C. & S.W. R. Co., 106 U.S. (16 Otto) 286 [1 S.Ct. 140, 27 L.Ed. 117], says:
 "It is said to be a well established rule that a mortgagee obtains a specific lien upon rents and profits by diligently securing the appointment of a receiver, and a second or other subsequent mortgagee may thus secure an advantage over the first mortgagee as to the rents collected, even though the first mortgagee may not receive from the foreclosure sale a sufficient amount to discharge his mortgage debt. But this rule is said to apply only to those cases where the first mortgagee is not a party to the suit."
 Later, in section 582 of the same volume, pages 753, 754, the author, citing Longdock Mills & Elev. Co. v. Alpen, 82 N. J. Eq. 190 [88 Atl. 623], says: "If a receiver, pending a foreclosure action by a subsequent mortgagee, is appointed on his motion, and for his benefit, such an appointment enures to his benefit only; and where no other lienholder asked to have the receivership extended to his lien, the rents and profits should be applied to the discharge of his debt only. A junior mortgagee, obtaining the appointment of a receiver thereby acquires a specific lien on the rents collected by the receiver and is entitled to them as against a prior mortgagee who made no application for the appointment of a receiver. The junior mortgagee is entitled to the rents collected, even though the prior mortgage contains a provision assigning the rents as further security upon default. The first mortgagee cannot have a deficiency judgment in his favor satisfied out of the funds collected by the receiver appointed at the instance of the second mortgagee."
 Again the author, in the same volume, section 622, page 795, quotes with approval the following from the case of *21 Post v. Dorr, 4 Edw. Ch. (N.Y.) 412, 414: "It was held 'to be an established rule, that a second or third mortgagee who succeeds in getting a receiver appointed, becomes thereby entitled to the rents collected during the appointment, although a prior mortgagee steps in and obtains a receivership in his behalf and fails to obtain enough out of the property to pay his debt. This is on the principle that a mortgagee acquires a specific lien upon the rents by the appointment of a receiver of them; and if he be a second or third incumbrancer, the court will give him the benefit of his superior diligence over his senior, in respect to the rents which accrued during the time that the elder mortgagee took no measure to have the receivership extended to his suit and for his benefit.' "
 Clark on Receivers, 2d ed., vol. 2, section 953, page 1373, states the rule as follows: "A junior mortgagee has the right to foreclose his mortgage upon default and on the ground of inadequacy of security, or other ground ... and when such receiver is appointed, he is appointed for the benefit of the junior mortgagee. Such junior mortgagee may through a receiver obtain the rents and profits of the mortgaged property. A senior mortgagee desiring to obtain such rents and profits to apply on his mortgage should actually possess himself of them or of the right to them through some mutual arrangement therefor, or he should make application to the court to have the receivership extended for his benefit."
 In line with the above is our section 564 of the Code of Civil Procedure, subdivision 2, which reads: "In superior courts a receiver may be appointed by the court in which an action or proceeding is pending ... in the following cases: ... 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 condition of the mortgage has not been performed, and that the property is probably insufficient to discharge the mortgage debt; ..."
 Although the order appointing the receiver is not before us, enough appears to show that the junior mortgagee proceeded under said subdivision of said section 564; also that the senior mortgagee, though a party defendant, made no effort to share in the fruits of the receivership. He was not in fact a real party in interest, save alone on the question *22 of priority of lien, as he did not join in the foreclosure. The junior mortgagee could have dismissed as to the senior mortgagee without affecting the rights of said mortgagee. And by not joining in the request for a receiver, said senior mortgagee could not have appealed from an order denying the application, had it been made. By the independent action for foreclosure the senior mortgagee evinced not only a desire not to ask for foreclosure in the previous action but showed conclusively a lack of interest in the previous receivership as well as an election to forego this mode of relief on its own account.
 [2] Had no receivership been applied for, said rents, issues and profits from the property would have inured to the benefit of the mortgagor and been wholly lost to both mortgagees. We therefore conclude that the petitioner has a special lien upon these funds, subject to the rights of the mortgagor, and respondent mortgagee is without any rights therein. These funds are the res or subject matter of the foreclosure action instituted by petitioner. Although, by a foreclosure of the senior mortgage, the property itself has been taken from under petitioner's lien, still said funds remain yet to be disposed of by a plenary judgment in the action and respondent bank is without interest of any kind therein or in the judgment that may follow in the case.
 This conclusion renders comparatively simple the disposition of the further contention that the writ of certiorari is not available. [3] It seems clear that by a summary order a court may not divest itself of the subject matter of the action and award it to a party with no interest whatsoever therein without exceeding its jurisdiction. Such order is not upon a collateral matter but is a complete divestiture of jurisdiction in advance of a trial on the merits. Such a procedure is unknown to the practice and an order made under such circumstances may be annulled upon certiorari. (Stanton v. Superior Court, 202 Cal. 478 [261 P. 1001].)
 The petition is sustained and the order is annulled.
 Curtis, J., Seawell, J., Waste, C.J., and Shenk, J., concurred.
