Mr. Justice Lamar,
after making the foregoing statement of facts, delivered the opinion of the court.
In the record there are sixty assignments of error involving many rulings of the trial court and the construction of the contract. We can only consider those Which present the Federal question that, in faffing to sustain the plea of res judicata, the court denied plaintiff a right arising under the laws of the United States. The refusal of the state court to treat the decree of the United States court • as a bar to the present action is said to have impaired the obligation of that decree as a contract; denied the full faith and credit to which it was entitled and deprived Swift of it as property without due process of law. But all these contentions finally resolve themselves into the single question as to whether the dismissal was on the merits finally adjudicating that McPherson had no enforceable rights undet the contract which was the basis of that suit.
Ordinarily, such a question is answered by a mere inspection of the decree — the presumption being that a dismissal in equity, without qualifying words, is a final decision on the merits. That presumption of finality, however, disappears whenever the record shows that the court did not pass upon the merits but dismissed the bill because of a want of jurisdiction, for want of parties, because the suit was brought prematurely, because the plaintiff had a right to file a subsequent bill on the same subject-matter, or on any other ground not going to the merits. The scope of such decree must in all cases be measured not only by the allegations of the bill, but by the ground of the demurrer or motion on which the dismissal was based. Hughes v. United States, 4 Wall. 232, 237; Mayor of Vicksburg v. Henson, 231 U. S. 259.
From an examination of this record it is evident that the dismissal by the United States court was not for want of merit in the bill, because the demurrer had already been overruled. It was not for insufficiency of the testimony, because none had been taken though answer and replication had been filed. It was not a dismissal after a hearing on bill and answer alone, for the defendant was asking to withdraw" his affirmative defense and insisting that a decree be entered in favor of McPherson. It was not a dismissal as on a retraxit, for the plaintiff not only did not renounce his cause of action, but, in his motion .asserted his rights under a contract which provided for a future adjustment of profits and. liabilities, whenever the amount of profits or losses was ultimately determined by the actual sale of the land.
McPherson seems, at first, to. have assumed' that it was not necessary to wait until the property had been sold, but that by a then present payment of $9,250 he could at once acquire title to an undivided half interest in the lots. His tender of that sum was however declined by Swift who, a year or more later, finally decided to accept the money and asked that a decree be entered in McPherson's favor, McPherson then refused to pay what lie had previously offered, explaining in his response to Swift's motion, that since the rejection of the tender the land had decreased in value and, asserting that he was not then willing to do. more than was required by the contract —under which he could wait until the ultimate sale of the property to determine what, if anything, he was bound to pay. He thereupon "moved the court to dismiss the bill as prayed for in this motion." The motion was granted, and Swift excepted.
The record presented an unusual and somewhat ludicrous shifting of positions, — with the defendant insisting that a decree be entered against himself,' the complainant resisting a decree in his favor; and the defendant, with no cross-bill filed, excepting to a dismissal. Of course this reversal of position does not change the legal effect of the decree, but it serves to emphasize the fact that it was not a decree against plaintiff on the merits, but one based on McPherson's motion which asserted a contract fixing liability and giving him rights dependent on the ultimate outcome of the investment. The court did not decide what those rights were, nor did it adjudicate that a suit to enforce them could not thereafter be filed. The decree not being on the merits could not be a bar to such subsequent suit in a state or United States court (Texas Co. v. Starnes, 128 Fed. Rep. 183). The refusal to treat the decree as conclusive of a point which had been left open did not deprive Swift of any Federal right and the judgment of the Supreme Court of South Dakota must be
Affirmed.