
419 P.2d 752 (1966)
Duane F. SMITH and Ralpha J. Smith, doing business as Smith Dairy, Plaintiffs and Appellants,
v.
R.W. BAXTER, Guy D. Piatt, Zoe M. Kilbourne, Joe Eisenman and Lynn M. Martin, comprising the Montana Milk Control Board, Defendants and Respondents.
No. 11149.
Supreme Court of Montana.
Submitted September 16, 1966.
Decided November 1, 1966.
*753 Graybill & Graybill, Leo Graybill, Jr. (argued), Great Falls, for appellants.
Geoffrey L. Brazier (argued), Helena, for respondents.
JAMES T. HARRISON, Chief Justice.
This is an appeal from an order and judgment of the district court of Lewis and Clark County dismissing with prejudice a petition for a writ of certiorari and affirming and approving an order of the Montana Milk Control Board.
The plaintiffs-appellants were dairy farmers and will be referred to as the producers. The defendants-respondents are the Montana Milk Control Board and its members and will be referred to as the Board. The third party that is indirectly concerned with this appeal is the Vita Rich Dairy, Inc., and it will be referred to as the distributor.
The facts that are determinative of this appeal deal with the procedural steps that have been taken by the producers in this case.
On June 25, 1965, the producers filed civil cause 5422 in the district court of Phillips County praying for injunctive and declaratory relief against the distributor. On that same day an order to show cause and a temporary restraining order were issued. On the ordered return day, the producers, the distributor, and their respective attorneys met at the time and place ordered, and negotiated a settlement of their differences.
The settlement was memorialized by a written stipulation between the parties signed by their respective attorneys of record. The producers signed their attorney's copy of the stipulation and authorized him to approve the settlement.
The stipulation included the agreement that civil cause 5422 "is hereby, dismissed as of December 28, 1965, on the merits, with prejudice, as fully and finally settled." The stipulation was dated July 28, 1965.
A short time before December 28, 1965, the producers (represented by different counsel) filed a motion to dismiss the proceedings in civil cause 5422 without prejudice. The stipulation was filed with the clerk of the district court of Phillips County on December 28, 1965.
On January 10, 1966, the district court of Phillips County made and entered its *754 order denying the motion to dismiss without prejudice civil cause 5422. The district court's order concluded that the stipulation disposed of all differences and disagreements existing between the parties and ordered civil cause 5422 dismissed on the merits, with prejudice, as fully and finally settled.
No appeal was taken from the order of January 10, 1966.
On January 3, 1966, the producers filed a petition with the Board. The subject-matter of this petition was the same controversy that had existed in civil cause 5422. At the hearing on the petition, the distributor set up the defense of res judicata. The distributor introduced correct copies of the proceedings in civil cause 5422. The Board agreed that the matter had been fully settled by the proceedings in civil cause 5422 and dissolved and dismissed the administrative proceedings by an order dated February 16, 1966.
On March 1, 1966, the producers filed their petition for writ of certiorari in civil cause 30973 in the district court of Lewis and Clark County. The district court of Lewis and Clark County agreed that the proceedings in civil cause 5422 were res judicata between the producers and the distributors. On March 22, 1966, the district court of Lewis and Clark County dismissed the producers' petition with prejudice, quashed and dissolved the writ of certiorari and approved and affirmed the Board's order of February 17, 1966.
The issue presented can be stated in the following manner:
Whether a prior stipulation in compromise of litigation in a district court in Montana on the merits, with prejudice, as fully and finally settled, is res judicata and a bar to an adversary administrative proceeding in Montana, where the same parties, the same subject-matter, and a prayer for identical relief are involved in both matters, and where the district court, after a hearing on the validity of the stipulation, entered a final judgment on the merits, with prejudice, as fully and finally settled, which order was never appealed from.
The district court of Lewis and Clark County was correct in ruling that the proceedings in civil cause 5422 were res judicata to any administrative proceedings before the Board or to any further proceedings in district court.
In Brannon v. Lewis and Clark County, 143 Mont. 200, 207, 208, 387 P.2d 706, 711, we reviewed the tests that can be applied to see if the plea of res judicata will be valid and stated:
"In State ex rel. Sullivan v. School Dist. No. 1, 100 Mont. 468, 472, 50 P.2d 252, we established four criteria that must exist before a plea of res judicata would be sustained. These criteria are: (1) the parties or their privies must be the same; (2) the subject-matter of the action must be the same; (3) the issues must be the same, and must relate to the same subject-matter; and (4) the capacities of the persons must be the same in reference to the subject-matter and to the issues between them."
Each of these four criteria is clearly met in this case.
The producers do not contend that such is not the case. Their contention is that their original action in seeking relief from the district court of Phillips County was improper because the Board has primary jurisdiction over the subject-matter that was in dispute. Thus, they contend that the district court of Phillips County lacked jurisdiction to entertain their action or to accept their stipulation as settlement of the dispute.
The producers have failed to point out to this court the specific Montana statute which gives the Board primary jurisdiction of the subject-matter which was the basis of this dispute. The Milk Control Act is admittedly broad in its terms, but it did not foreclose the producers from seeking relief from the district court in this particular case.
*755 The producers chose their initial forum  the district court. They obtained a stipulation that was satisfactory to them in the beginning, but later they became dissatisfied. However, their dissatisfaction came too late for the stipulation had become binding upon them. The stipulation's acceptance by the district court of Phillips County acted as res judicata to any further action by the producers on the subject-matter of the stipulation, particularly where, as here, the district court by its order, denying the motion to dismiss, ruled against the producers and no appeal was taken.
The order and judgment appealed from is affirmed.
JOHN HARRISON, ADAIR, WESLEY CASTLES, JJ., and NAT ALLEN, District Judge, concur.
NAT ALLEN, District Judge, sitting in place of DOYLE, J.
