The plaintiff railroad corporation commenced this action in the. Wayne circuit court against the judges aud clerk of the county court of that county to enjoin James F. Hatton, who is one of said judges, from surrendering to the county court.a deed held by him in escrow, conveying to the company some nine thousand acres of swamp lands; and to enjoin the judges from making any order changing the records of the court under which the deed was executed, until it should be determined whether the plaintiff was entitled to the possession of the same, and for other relief.
The county of Wayne was made a defendant on its own motion. The Mississippi circuit court, to which the cause was transferred by change of venue, dissolved the temporary injunction and dismissed the bill, after a full hearing of the case on the pleadings and evidence.
The undisputed facts are these : On the fourteenth of March, 1882, the railway company and the county of Wayne, acting by and through the county court, entered into a contract for the purchase and sale of all the swamp lands of .that county. It. is stated in the lengthy preamble to the contract-by way of recitals, that the county sold to the company its swamp lands *50aggregating ninety-five hundred acres at the price of $1.25 per acre, making the sum of $11,875 ; that a deed, conveying the land to the company, had been placed in the hands of James P. Hatton ; that the company “proposes to do certain work to drain, reclaim and protect said land from the overflows of the St. Francois and Castor rivers for the price and sum of $11,875, and which is a low charge for said work ; and, whereas said proposed work will open to settlement and cultivation a large portion of the southern part of this county, now particularly of no value, and also promote the health of the country by a drainage of said lands.” The contract then goes on to provide that, “in consideration' of ’the premises and other valuable considerations,” the county agrees “ to pay said railway company the sum of $11,875, said sum being the price of ninety-five hundred acres of swamp land sold to said railway company at $1.25 per acre, and a deed to said lands has been made and executed by said county of Wayne this day and delivered to James P. Hatton, as an escrow, and to be by him delivered to said railway company when said railway company shall have fully performed and done the work hereinafter to be specified.”
The subsequent material stipulations on the part of the company are as follows :
“First. To erect, build and maintain a levee from some point on the boundary line on the east side of said Wayne county, in township 27, across that part of Wayne county known as Mingo Swamp to the highlands on the west side of said swamp, to such a point on the said opposite side as-said railway company deems best suited in that behalf, said levee so erected to have a top or crown of not less than twelve feet, and a base to be in proportion; and, further, said railway company agrees to open continuous ditches along said levy on both sides, if necessary, to drain said land. It is, however, distinctly understood that the said railway company, if it shall deem it advisable, may build trestles or *51drive piling or build bridges at any point or points along said levee when it shall be deemed advisable by it to do so, and that said county of Wayne will not object or except to the fact that the said levee is not complete earth embankment; but on the other hand the said railway company expressly agrees to drain the surface water, when necessary, into said places where it may have erected trestlework, piling or bridging, and it is distinctly understood that it is discretionary in said railway where it may wish to erect and maintain said trestle, piling or bridges.
‘ ‘ Second. Said railway company agrees that it will do said work within two years from date of this contract, and also that within said time, in order to secure the permanency of said levee and work, it will build and operate upon said levee, thrown up and built by it, a railway, and to extend said railway in a continuous line through township 27, in Wayne county, to some eligible point on the St. Francois river, in said township.
£i Third. And said railway company further agrees to cut down the timber on said line selected by. it one hundred feet wide across said swamp to the county line.”
“ Sixth. It is further understood that the building of said levee as aforesaid, and laying the iron over the same and through said township within one mile of the channel of said St. Francois river, shall be considered as performing the contract on the part of said railway company, and that as soon as said levee is built and railway operated thereon to secure its permanency to said St. Francois river as in this article set out, that the said James F. Hatton shall at once, without further order, or decree, or act, deliver said deed or patent to said railway company.
£ ‘ Seventh. It is agreed by said railway company that the said work of building said levee, as in this- contract set out, shall be performed under the direction of *52Wm. A. Penny as commissioner of Wayne county, but that the said county shall not be liable to pay the compensation or any compensation to said Penny in that behalf.”
The time for completing the work was extended to the first day of August, 1884, by an order of the county court.
Mr. Penny, who is designated county commissioner in the contract, and who was the superintendent of the railway company, made a report to the county court on August 11, 1884. In the report he says the work was done under his supervision as commissioner, and had been completed according to the contract, and to his satisfaction. The court then took some steps towards correcting errors in the description of the lands in the deed. In this order the statement is made that the company “has completed its railway, and is now entitled to a deed to said lands.” Hatton, however, declined to deliver the deed to the company, and threatened to return it to the court for cancellation. Hence this suit.
The parol evidence shows that the railway company erected an embankment, some three miles in length and from one to six feet in height, across the south end of Mingo Swamp, and built and still operates its railroad thereon. The embankment runs east and west, parallel to, and one mile north of, St. Francois river. The swamp extends northward from the railroad, and covers a large area of country. Three openings were left in the embankment at places where there are depressions in the ground, constituting natural outlets for the water. These openings are fourteen, one hundred and fourteen hundred and fifty feet in length ; and at these places the railroad is supported by trestle-work. Barrow-pits, irregular in length and depth, were dug out on each side of the railroad to get earth for the embankment. They are connected and continuous and constitute the ditches and only ditches dug *53by the company. They have the effect to carry the water to the openings where it runs in and out of the swamp, according to the stage of the water in the St. Francois river.
The evidence for the plaintiff tends to show that the embankment serves to check and hold overflows from the river; that the water which runs into the swamp through the trestlework on' such occasions settles in low places, and then runs out as the flood goes down in the river, and that a considerable portion of the swamp is now dry land. Other evidence tends to show that the embankment .has made little or no change.
The company laid out and expended $11,100 in building the embankment. This was more than the price of the land at $1.25 per acre, considering the fact that the county had no title to some of the property described in the deed.
1. The first proposition urged in support of the decree dismissing the bill is, that the contract was one made in aid of the construction of a railroad, and that it 0was not made for the purpose of reclaiming the swamp land; and is, therefore, void for want of authority in the county court to make it.
The railway company cites and relies upon State ex rel. v. Wayne County, 98 Mo. 362, as affirming the right of the county court to make this contract. The board of education instituted that suit against the county, county judges and the railway company to set aside and cancel the contract brought in question in the present case. The chief contention in that case was that the school fund was entitled to all the moneys arising from the sale of these swamp lands. It was then ’ ruled that county courts have the power to sell swamp lands for the consideration of reclaiming them, and that the school fund would be entitled only to the surplus remaining after the expenses of reclaiming the lands had been paid.
*54That case rather assumes than decides that the contract was one made for the purpose of reclaiming swamp lands. It was decided in this court after the appeal in the present case had been allowed by the circuit court. There is no claim of res judicata in the pleadings in this case, ahd we, therefore, proceed to inquire as to the authority of the county court to make the contract in question.
The recitals in the preamble to the contract are designed to give to the transaction the appearance of a sale of the swamp lands for a stipulated price, and then the payment of the money to the company for doing the work ; still it is very clear that the real transaction was this : The county court sold the lands to the company in consideration that the company would do the specified work. No money was paid, or intended to be paid, to or by the county. It may, however, be assumed for all purposes of this case that the county court could turn over swamp lands in payment for work done in reclaiming them. But is that the real character of this contract ?
The preamble says the proposed work will open to4 settlement a large portion of the southern part of the county, and promote the health of the county by a drainage of said lands. This is but an assertion as to what would be the effect of doing the work. The company nowhere agrees that such will be the effect. Again, the preamble says the company proposes to do work to drain, reclaim and protect said land from overflows ; but what it actually agrees to do is this : To build a levee across Mingo Swamp of a specified width at the top, and to operate a railroad thereon, and to extend the railroad through the township to some point on the river. It has the right to leave openings in the embankment wherever it sees fit to do so. But for these openings the embankment would have the effect of, a dam, and would convert the swamp into a lake. Thus far the covenants to be performed by the company look *55to the building of a railroad, and to nothing else. If there are any stipulations on the part of the company looking to a drainage of the lands it is those wherein it agrees “ to open ditches along said levee on both sides, if necessary, to drain said land,” and said “company expressly agrees to drain the surface water when necessary into said place's where it may have erected trestle work.”
As we understand these provisions of the contract, they amount to this and no more: The company agrees to dig ditches along the sides of the railroad embankment, so as to drain the water into such openings as the company sees fit to make. This is no more than an embankment built for railroad purposes only would require. The law requires every railroad company to make such drains along the sides of its road. R. S, 1879, sec. 810. The construction given to the contract by the company itself is, that the barrow-pits constitute the ditches and the only ditches it agreed to make.
Notwithstanding the labored preamble, we are forced to the conclusion that this contract is no more than a donation of these lands to the company in consideration that it would build and operate its road on a line crossing the swamp. It does not make this embankment a levee to call it by that name. We are bound to look to the actual agreement made by the parties to the contract, and, in doing this, it cannot be said that this is a contract to sell swamp lands to pay for reclaiming them. The stipulations speak for themselves, and show the real character of the contract.
The swamp lands are the absolute property of the counties in which they are situate ; but the counties hold them for purposes designated in the law, and they must be sold for the purposes and in the manner pointed out by the law concerning swamp lands. Sturgeon v. Hampton 88 Mo. 211; State ex rel. Bobbins v. County Court, 51 Mo. 84. The county courts may cause the swamp lands to be sold, with or without *56drainage, at public or private sale; but they must be sold for not less that $1.25 per acre. R. S. 1879, sec. 6153. The proceeds are applied to purposes of reclamation, and the surplus, if any, goes to the school fund. Sec. 6155.
No claim is made that the Wayne county court had any authority in law to convey these lands to the company for the consideration that it would build its road along the designated route, and that is what was done and all that was done in this case. The county courts in disposing of swamp lands are but the agent of the counties, with powers limited and defined by law, and, when they step outside of the law, their acts are void. Saline County v. Wilson, 61 Mo. 237; Sturgeon v. Hampton, supra. If follows from what has been said' that the county court had no power in law to make the contract in question, and the plaintiff is not entitled to the relief which it demands.
2. The question is made in support of the decree of the circuit court that the railroad company had no charter powers to engage in the business of draining lands; but as we hold the contract was not one of that character, it is unnecessary to consider that question. Nor is it necessary to speak in detail concerning the question of fact as to whether the company complied with the terms of the contract. The embankment was certainly twelve feet wide on top when it was completed, though it seems to have been only from eight to eleven feet wide on the top when measured some three years thereafter. The barrow-pits, connected and continuous as they are, serve all the purposes of the ditches contemplated by the contract. We think the company performed all the conditions, which were conditions precedent to the delivery of the deed.
3. The county is the real party in interest, and there was no error in allowing it to be made a defendant. For the reasons before stated the judgment is affirmed.
All concur,except Barclay, J., who dissents.