
    Northcraft et al., Appellants, v. Martin et al., Respondents.
    1. A petition is not demurrable because a judgment is asked not warranted by the averments; the court may grant any relief consistent with the case made and the allegations of the petition.
    2. Where in a partition suit a sale of the premises is ordered, and previous to the sale it is agreed between certain parties in interest that one of their number shall bid off the property at such sale unless it brings a certain price, and hold it for the benefit of the parties to the agreement and such others of those interested as may choose to become parties thereto, and that the others shall abstain from bidding at such sale, and he does purchase the property under such agreement; held, that he will hold it in trust for all the parties in interest.
    
      Appeal from ' St. Louis Land Cowrt.
    
    Demurrer to a petition. Plaintiffs alleged substantially that Lewis Martin died leaying plaintiffs and defendants in this suit his sole heirs ; that all of said heirs joined in a petition for partition of certain premises that had descended to them as heirs of said Martin; that a decree or order of sale was made; that a sale was made and the sheriff acting under the said order sold the premises to the defendant William C. Martin; that immediately prior to said sale by the sheriff and on the day of the sale an agreement was entered into by and between said William C. Martin and certain of the heirs of Lewis Martin, by which it was agreed that the premises hereinafter described should be bid off by the said William C. Martin, providing the same did not bring a certain price per foot for different parcels thereof, and that he should hold the said premises for the benefit of the parties to such agreement and such others of the heirs of Lewis Martin as might, upon being notified, elect to become parties to said agreement; that all the other parties to said agreement agreed to abstain from bidding at such sale; that said property was by such arrangement and agreement purchased in by said W. C. Martin at much below its actual value; that most of the same was sold in bulk although susceptible of division; that plaintiffs were notified of the said agreement under which said sale was made, and desired to become parties thereto and have the benefit thereof; that William C. Martin- refused to permit them to become parties to said agreement or to have any of the benefits thereof according to its terms, and insists that he acquired at said sale and now claims to own said property discharged of all rights in the plaintiffs or any other persons not parties to said agreement, although all the other parties to the same are willing and desirous to allow plaintiffs and all the other heirs of said Lewis Martin to become parties to said agreement and to have all the benefits which may arise therefrom; that said agreement had a tendency to deter competition at such sale and caused said property to sell at much less price than it otherwise would; that said sheriff made a report of his sale and it was confirmed and the sheriff ordered to make a deed; that said deed was made ; that afterwards said William C. Martin and wife conveyed a portion of the premises so purchased in by him to one Aloys Heislen. The plaintiffs prayed the court to set aside and annul the sale of the property by the sheriff and the deed; also the sale by Martin to Heislen, and for such other and further relief, &c.
    The court sustained a demurrer to this petition.
    
      Bland Sf Coleman, for appellants.
    I. The court erred in sustaining the demurrer. (25 Mo. 309; 20 Mo. 290, 296 ; 8 Mo. 448.)
    
      Shreve, for respondents.
   Richardson, Judge,

delivered the opinion of the court.

It is unnecessary to decide whether the demurrer was improperly sustained for the reasons assigned by the plaintiff, because, in our opinion, for other reasons, the petition stated facts sufficient to constitute a cause of action. If William C. Martin, after making the agreement with the heirs, purchased the property at the sale in partition under the circumstances stated in the petition, he became clothed with a trust for all the parties interested in the sale, which he could not throw off without committing a fraud. The legal title to the land by the sale Tested in him, but he held it in trust for the other heirs, and the substantial rights of the parties were not changed or affected by the sale; and, if the allegations of the petition are sustained, the court by a decree should declare the trust, which may be executed by another sale. As to the lots purchased by Heislen, a resale should not be ordered if he bought in good faith or for a fair price, inasmuch as the heirs could be fully indemnified out of the purchase money.

A petition is not demurrable because it asks a judgment not warranted by the averments; nor is its true character determined by the relief it seeks, for when there is a defence the court may grant any relief consistent with the case made and embraced within the issue. (2 R. S. 1855, p. 1280, § 12 ; Ashby v. Winston, 26 Mo. 213.)

The other judges concurring, the judgment will be reversed and the cause remanded.  