Mr. Justice PITNEY delivered the opinion [ showing the difference between the tariff actually charged and that which would have of the Court. been charged had the rate inhibited been applied, also showing the particulars of the carriage, and the names of the persons affected as far as practicable, the record to be kept subject to the further order of the court, and further conditioned that if it should eventually be decided that so much of the order as inhibited the enforcement of the rates ought not to have been made, the complainant should within a reasonable time to be fixed by the court refund in every instance to the party entitled the excess in charge over what would have been charged had the inhibited rates been applied, together with lawful interest and damages. Complainants enLater tered into such bonds with sureties. *On July 18, 1908, the two railway companies concerned-the St. Louis, Iron Mountain & Southern, which for brevity may be called the Iron Mountain, and the St. Louis Southwestern, which may be called the Southwestern-brought separate suits in equity in the Circuit Court (now the District Court) of the United States for the Eastern District of Arkansas against the members of the state Railroad Commission in their official capacity, and against two citizens of an additional injunction bond was required that state named as frequent shippers of to be and was furnished by each complainant, freight upon the railroad lines, for injunc- but without sureties, conditioned substantialtions to restrain the enforcement of certainly as above. intrastate freight and passenger rates; setting up that the commission was duly organized under an act of the Legislature, and was thereby authorized to fix rates to be charged by the railroads in the state of Arkansas for the transportation of freight and passengers in that state; that the commission had officially adopted a tariff of freight rates applying to all classes and commodities of freight on all railroads operated in the state, and had ordered it to take effect on June 15, 1908; that the rates were unreasonable, unjust, discriminatory, confiscatory, and void; that they did not yield an adequate return for the services rendered; and that the operation of said tariff would deprive complainants of their property without due process of law and deny to them the equal protection of the laws, in violation of section 1 of the Fourteenth Amendment to the Constitution of the United States. It was further alleged that the rates for the transportation of passengers in the state fixed by an act of the Legislature passed February 9, 1907, and promulgated by order of the railroad commissioners, were confiscatory and void in their effect upon the complainant railways and, therefore, violative of the Fourteenth Amendment; but the passenger rates are not involved in the present appeals, and need not be further mentioned. These four cases were consolidated for the purposes of the hearing in the District Court, and have been treated as consolidated for the purposes of the hearing on appeal. They are so closely related that they may be dealt with in a single opinion. *138 Full answers having been filed by the Railroad Commission, and testimony having been taken, the cases were brought on to final hearing, and on May 11, 1911, final decrees They were made, the same in both cases. enjoined the commissioners and their successors, the individual shippers named as defendants, and all other patrons of the road in the shipment of freight between stations in the state of Arkansas, from enforcing or attempting to enforce any of the provisions of the freight tariff in question. In addition to this, and after disposing of the question of costs, each decree ordered that the bond for injunction be released and the sureties thereon discharged from liability, and concluded as follows: "And the court reserves and retains unto itself jurisdiction of the subject-matter of this suit and of all parties hereto, to the end that such other and further orders and decrees may be made herein as may become necessary by reason of any changed conditions as to the facts, equites or rights that may hereafter take place or arise." The jurisdiction of the federal court depended solely upon the ground that the cases arose under the Constitution of the United States, and that the matter in controversy in each case exceeded the jurisdictional amount. Temporary injunctions were issued in September, 1908, and continued in force during the pendency of the suits. The Circuit Court upon granting them ordered in each case that the complainant should execute a bond in the penal sum of $200,000, conditioned that complainant should keep a correct account re specting its carriage of passengers and freight, | $139 The railroad commissioners appealed to this court (the defendant shippers having been severed), the cases were heard together, and the decrees of the Circuit Court were reversed June 16, 1913, with directions to dismiss the bills without prejudice. Allen v. St. Louis, Iron Mountain & Southern Ry., 230 U. S. 553, 33 Sup. Ct. 1030, 57 L. Ed. 1625. causes were remanded to the District Court, the mandate in each case reciting the reversal and the order remanding the cause with directions to dismiss the bill without prejudice, and concluding as follows: The "You, therefore, are hereby commanded that such execution and further proceedings be had in said cause, in conformity with the opinion and decree of this court, as according to right and justice, and the laws of the United States, ought to be had, the said appeal notwithstanding." Upon the going down of the mandates the contravention of the Constitution of the UnitDistrict Court on July 18, 1913, entered de- ed States." crees in obedience thereto dismissing the bills without prejudice and dissolving the injunctions; and at the same time and as a part of the same decrees made a reference This section, of course, was the predeces3, 1911, c. 231, 36 Stat. 1157 [Comp. St. § sor of section 238, Judicial Code (Act March 1215]), under which the present appeals under a rule of the court to a special master for the purpose of determining the dam-were taken. And it is plain that the orders ages alleged to have been sustained by the of the Railroad Commission were state laws railroad commissioners by reason of the within the meaning of this provision. Wilgranting of the temporary and permanent in-liams v. Bruffy, 96 U. S. 176, 183, 24 L. Ed. junctions, declaring: 716; Atlantic Coast Line v. Goldsboro, 232 U. S. 548, 555, 34 Sup. Ct. 364, 58 L. Ed. 721. The provisions of the Judicial Code which regulate the jurisdiction of the Circuit Court of Appeals originated in section 6 of the act of 1891. They must be construed togeth "That in determining these damages, for the recovery of which the said commissioners are not acting for themselves but for the benefit of all persons, shippers, consignees and passengers, who have sustained any damages by reason of the granting of said injunctions," theer with those provisions of law that confer master was authorized to examine witnesses upon the District Court (section 24, Judicial and to give notice by publication that all per- Code [Comp. St. § 991]), and formerly confersons naving claims against the complainants by red upon the Circuit Court, original jurisreason of the granting of the injunctions should diction in suits of a civil nature arising unpresent them within a time specified for the der the Constitution or laws of the United purpose. States, and in suits between citizens of different states. By section 128 of the Code (Comp. St. § 1120), the Circuit Courts of Appeals are to exercise appellate jurisdiction over the final decisions of the District Courts "in all cases other than those in which appeals and writs of error may be taken direct to the Supreme Court, as provided in section 238, unless otherwise provided by law; and, except as provided in sections 239 and 240, the judgments and decrees of the Circuit Courts of Appeals shall be final in all cases in which the jurisdiction is dependent entirely" upon diversity of citizenship. Section 239 (Comp. St. § 1216) provides for the certification of questions by the Circuit Court of Appeals to this court; section 240 (section 1217) permits this court to review by certiorari any case in which the judgment or decree of the Circuit Court of Appeals is made final; and, by section 241 (section 1218), in any case in which the judgment or decree of that court is not made final, there may be an appeal or writ of error *to this court where the matter in controversy exceeds $1,000 besides costs. Under this reference the appellants in cases Nos. 92 and 93 and the appellees in Nos. 94 and 95 intervened and presented claims for a refund of the difference paid by them in freight rates between the rates prescribed by the commission and those put in force by the railway companies. The master reported favorably upon these claims, dividing the amounts allowed into three periods, the first and second of which included the time elapsed between September 3, 1908, when the interlocutory injunctions were issued, and May 11, 1911, the date of the final decrees, and the third period included the time elapsed between the latter date and July 18, 1913, the date of the decrees entered upon the mandates. The railway companies filed exceptions to the master's report, which were sustained by the District Court as to the claims involved in cases Nos. 92 and 93 and overruled as to those involved in Nos. 94 and 95, and a combined decree was made accordingly. [1, 2] The parties aggrieved desiring to appeal, and being in doubt whether the appeal lay to this court or to the Circuit Court of Appeals, prayed for and were allowed appeals to both courts. Hence the first question that confronts us is whether the decree is the subject of a direct appeal to this court. We are clear this question must be answered in the affirmative. The appeals from the final decrees in the main causes were brought direct to this court, because of the constitutional question, under section 5 of the Circuit Court of Appeals Act of March 3, 1891 (26 Stat. 827, c. 517), which provided for such an appeal in the following *cases, among others: "In any case that involves the construction or application of the Constitution of the United States. * In any case in which the Constitution or law of a state is claimed to be in The present appeals relate to a decree made in a subordinate action ancillary to the main causes, in which, as has been stated, the federal jurisdiction was invoked solely upon the ground that the cases arose under the Constitution of the United States. It has been held repeatedly that jurisdiction of subordinate actions is to be attributed to the jurisdiction upon which the main suit rested, and hence that where jurisdiction of the main cause is predicated solely on diversity of citizenship and the decree therein is for this reason made final in the Circuit Court of Appeals, the judgments and decrees in the ancillary litigation also are Rouse v. Letcher, 156 U. S. 47, 15 Sup. Ct. 266, 39 L. Ed. 341; Gregory v. Van Ee, 160 U. S. 643, 16 Sup. Ct. 431, 40 L. Ed. final. 566; Rouse v. Hornsby, 161 U. S. 588, 16 ( ville v. Cumberland Tel. Co., 231 U. S. 652, Sup. Ct. 610, 40 L. Ed. 817; Pope v. Louis- 34 Sup. Ct. 260, 58 L. Ed. 419. ville, etc., Ry., 173 U. S. 573, 577, 19 Sup. Ct. 500, 43 L. Ed. 814. [4] In support of the contention that the final decrees had the effect of discharging the complainants and their sureties from liability upon the bonds by reason of previous overcharges, it is pointed out that this part of the decrees was not appealed from, nor was error assigned to the court's action in vacating the bonds and releasing the sureties. Whether, under the circumstances, the action of this court in reversing the decrees The proceeding out of which the decree now in question arose was not merely ancillary, but was in effect a part of the main causes, taken for the purpose of carrying into effect the decrees of this court, reversing the final decrees in the main causes, and, at the same time, for the purpose of giving effect to a reservation of jurisdiction by the court below as contained in those final de-in respect of their main provisions granting crees. The supplementary decree that is now permanent injunctions had the effect of rebefore us, since it simply brings to a conclu- versing also that portion which discharged sion those former suits pursuant to our de- the liability upon the injunction bonds is a crees therein, must be treated as involving question upon which we need not pass. For, the construction and application of the Con- irrespective of this, those clauses of the final stitution of the United States and as being decrees by which the District Court retained made in a case in which a state law was jurisdiction for the purpose of making such claimed to be in contravention of the federal further orders and decrees as might become Constitution, within the meaning of section necessary, coupled with the subsequent mandates of this court permitting further pro238, Judicial Code. Therefore the motions to dismiss must be ceedings to be taken in conformity with our opinion and decrees and according to right denied. and justice, empowered the District Court to set aside so much of its final decrees as released the railways and their sureties from liabilities theretofore incurred under the injunction bonds. This is what the District Court in effect did when it ordered the reference and sustained the claims of the Oil Company so far as they accrued prior to the final decrees. [5] It is argued that the condition of the bonds-that if it should eventually be decid Upon the merits, it will be convenient to take up first the case of the Southern Cotton Oil Company, appellee in Nos. 94 and 95, in whose favor claims were allowed by *the master as against each of the two railways and for each of the periods referred to. The railways excepted upon two grounds: (1) Because the final decrees of May 11, 1911, discharging the injunction bonds, and releasing the makers thereof from liability had the effect to relieve the railways and their sureties from all liability by reasoned that the order inhibiting the enforcement of the granting of the injunctions; and (2) of the commission rates should not have been as to such claims for overcharges as accrued made the complainant should refund, etc.— subsequent to the date of the final decrees, never was broken because it was not at any on the ground that upon the rendition of time adjudged that the allowance of the temthose decrees the injunction bonds ceased porary injunctions was improper. But this is to be operative and created no further liabil- to construe the bonds according to the letity, and that the railways incurred no liabil- ter and not according to the substance. The ity to the claimants under the final decrees. state statute and the orders of the Railroad The District Court overruled the exceptions Commission entitled shippers to the benefit and sustained the claims of the Oil Company of the rates thereby established; and they as against the railway companies and the were thus entitled at all times except as it sureties with interest at 6 per cent. per an- became necessary to stay the operation of num from the respective dates that the overthe rates by equitable process in order to charges were made. permit of a judicial investigation into the over-question of their adequacy. The burden of proof to show them inadequate was upon the railway companies; and when they failed to sustain this burden they at the same time showed that the injunctions ought not to have been allowed. [3] We deal first with so much of the charges as accrued prior to the final decrees. In St. Louis, Iron Mountain & Southern Ry. Co. v. McKnight, 244 U. S. 368, 373, 37 Sup. Ct. 611, 61 L. Ed. 1200, doubt was expressed whether, in view of the form of the mandate, there was any power in the District Court to determine the liability of the railway companies upon the bonds. But at that time our attention was not called to the fact that the mandates contained a provision authorizing further proceedings-a provision that removes all question of the power of the District Court. In re Louisville, 231 U. S. 639, 645, 34 Sup. Ct. 255, 58 L. Ed. 413; Louis-itation when the suits were brought to a final [6] As to that portion of the claims which' accrued after the final decrees, this, as we already have held in the McKnight Case, 244 U. S. 368, 374, 37 Sup. Ct. 611, 61 L. Ed. 1200, was not recoverable upon the injunction bonds, nor against the sureties therein. On a fair construction of the conditions of those instruments, their obligation expired by lim 39 SUP.CT.-16 conclusion. Hence, to the extent that the [typical case for the application of the princi. supplemental decree now under review ple of restitution; and the District Court awards a recovery against the sureties for properly held the commission to be the repclaims accruing after the final decrees, it resentative of the shippers for this purpose. must be modified. [9] The suggestion that the order of refer[7] But, in our opinion, this portion of the ence was made under a rule of court that reclaims is allowable against the railway com-lated only to damages recoverable on injuncpanies themselves upon the principle, long tion bonds, and furnished no foundation for established and of general application, that a decree against the railways on the theory a party against whom an erroneous judgment of restitution, is without weight. The com. or decree has been carried into effect is en- panies were fully heard upon the merits, and titled, in the event of a reversal, to be restored there is no question about the facts. by his adversary to that which he has lost thereby. This right, so well founded in equity, has been recognized in the practice of the courts of common law from an early period. Where plaintiff had judgment and execution, and defendant afterwards sued out a writ of error, it was regularly a part of a judgment of reversal that the plaintiff in error "be restored to all things which he hath lost by occasion of the said judgment"; and thereupon, in a plain case, a writ of restitution issued at once, but if a question of fact was in doubt, a writ of scire facias was first issued. Anonymous, Salk. 588, citing Goodyere v. Ince, Cro. Jac. 246; Sympson v. Juxon, Cro. Jac. 699; Vesey v. Harris, Cro. Car. 328. See, also, Lil. Ent. 641, 650; Arch. Append. 195, 200. The doctrine has been mostly fully recognized in the decisions of this court. Bank of the United States v. Bank of Washington, 6 Pet. 8, 17, 8 L. Ed. 299; Erwin v. Lowry, 7 How. 172, 184, 12 L. Ed. 655; Northwestern Fuel Co. v. Brock, 139 U. S. 216, 11 Sup. Ct. 523, 35 L. Ed. 151. That a course of action so clearly consistent with the principles of equity is one proper to be adopted in an equitable pro'ceeding goes without saying. It is one of the *equitable powers, inherent in every court of justice so long as it retains control of the subject-matter and of the parties, to correct that which has been wrongfully done by virtue of its process. Northwestern Fuel Co. v. Brock, 139 U. S. 216, 219, 11 Sup. Ct. 523, 35 L. Ed. 151; Johnston v. Bowers, 69 N. J. Law, 544, 547, 55 Atl. 230. [8] It is argued that the claimant is not in a position to invoke the principle of restitution in this proceeding because it was not a party to the original proceedings, but came in by intervening before the master. This point is unsubstantial. The Railroad Commission, in defending the rate schedules against the attack of the railway companies, represented all shippers; the permanent injunctions that were awarded by the final decrees restrained all shippers from taking advantage of the commission rates; and during the time that those decrees remained unreversed the railway companies obtained the benefit of the injunction by exacting from this claimant, among others, in addition to the commission rates, those excess charges that form the basis of the present claims. It is a [10] In behalf of the railways, it is argued that the reversal of the decrees of May 11, 1911, "without prejudice," left the rights of the parties still in doubt, and thus rendered it improper for the District Court to award damages against the railways, either on the basis of a breach of the injunction bonds or on the basis of restitution. But it seems to us that the rights of the present shippers were so clear as to make an allowance of damages upon the injunction bonds and restitution upon the reversal of the decrees manifestly their due. That the reversal was "without prejudice" did not deprive the decrees of conclusiveness as to past transactions, but only prevented them from being a bar to future suits for injunction upon a showing of changed conditions. Missouri v. C., B. & Q. R. R., 241 U. S. 533, 539. 36 Sup. Ct. 715, 60 L. Ed. 1148. [11] The contention that there was error in allowing interest upon the amount of the overcharges is unsubstantial. The damage was complete when the overcharges were made, and as they were wrongfully made and without consent of the shippers, interest ran from that date on general principles. For these reasons, the decree in favor of the Southern Cotton Oil Company, modified so as to relieve the sureties from that part of the claims which accrued after the final decrees of May 11, 1911, will be affirmed. The claims of both the Arkadelphia Milling Company (No. 92) and Hasty & Sons (No. 93) were based upon the difference between rates charged on rough lumber from the forest to milling points and the rates provided in the commission tariff on such movements. The tariff contained certain maximum rates on iumber of this character applicable generally, and in addition certain "rough material rates" much lower than the others, conditioned upon a certain percentage of the manufactured product being shipped over the same line that brought in the rough material. The railway companies excepted to the allowance in favor of each of these appellants upon the ground that the "rough material rates" were discriminatory against shippers who did not reship the specified percentages of the finished product. As to the Hasty claim, there was an additional exception based upon the *ground that the movement of rough material to milling *147 points in the state and the subsequent forwarding of the finished product to market points outside of the state constituted interstate commerce, so that the rough material rates prescribed by the state commission were not applicable. The court sustained the exceptions on both grounds. State of Missouri ex rel. Jones, 238 U. S. 41, 54, 35 Sup. Ct. 671, 59 L. Ed. 1192; Cusack Co. v. City of Chicago, 242 U. S. 526, 530, 37 Sup. Ct. 190, 61 L. Ed. 472, L. R. A. 1918A, 136, Ann. Cas. 1917C, 594. [12, 13] To take up first the question of discrimination: The tariff gave the benefit of the rough material rates only where the shipper transported over the line of the carrier a certain percentage of the product manufactured from the rough material. The master found that the condition was complied with by these shippers and sustained the allowances accordingly. Lake Shore, etc., Ry. Co. v. Smith, 173 U. S. 684, 19 Sup. Ct. 565, 43 L. Ed. 858, did not set aside this established principle. The discrimination in favor of certain patrons, there referred to, was laid hold of rather as showing the unreasonable character of the regulation. The authority of that case is not to be extended. Louisville & Nashville R. R. Co. v. Kentucky, 183 U. S. 503, 511, 22 Sup. Ct. 95, 46 L. Ed. 298; Pennsylvania R. R. Co. v. Towers, 245 U. S. 6, 38 Sup. Ct. 2, 62 L. Ed. 117, L. R. A. 1918C, 475. The District Court sustained the defense of discrimination upon the authority of Lake Shore, etc., Ry. Co. v. Smith, 173 U. S. 684, 19 Sup. Ct. 565, 43 L. Ed. 858, and Cotting v. Kansas City Stockyards Co., 183 U. S. 79, 22 Sup. Ct. 30, 46 L. Ed. 92. We assume, without deciding, that, notwithstanding the general result adverse to the railway companies in the main suits, they were still at liberty to dispute the validity of the rate schedule as it related to particular shippers. See Chicago, etc., Co. v. Minnesota, 134 U. S. 418, 460, 10 Sup. Ct. 462, 702, 33 L. Ed. 970, concurring opinion of Mr. Justice Miller; St. Louis & San Francisco Ry. v. Gill, 156 U. S. 649, 659, 666, 15 Sup. Ct. 484, 39 L. Ed. 567; Ex parte Young, 209 U. S. 123, 28 Sup. Ct. 441, 52 L. Ed. 714, 13 L. R. A. (N. S.) 932, 14 Ann. Cas. 764; Missouri v. C., B. & Q. R. R., 241 U. S. 533, 538, 36 Sup. Ct. 715, 60 L. Ed. 1148. In our opinion, however, the District Court erred in its ruling. The rough material rates were but parts of a general schedule that covered a wide field. This schedule was established in the exercise of the legislative authority of the state, and could not be set aside by the court on the ground of discrimination unless it amounted to a denial of the equal protection of the laws guaranteed by the Fourteenth Amendment. Cotting v. Kansas City Stockyards Co., 183 U. S. 79, 22 Sup. Ct. 30, 46 L. Ed. 92, is not at all in point. While the opinion of Mr. Justice Brewer covers a wide range of discussion, a majority of the court (183 U. S. 114, 22 Sup. Ct. 30, 46 L. Ed. 92) placed the decision upon the ground that the statute of Kansas applied only to a single company, and not to others engaged in like business in the state, and thereby denied to that company the equal protection of the laws. [14] There remains the question whether the shipments by J. F. Hasty & Sons of rough material from the forest to the milling point, followed by the forwarding of the finished product to points outside of the state, constituted inter*state commerce. If they did, it is obvious that the state tariff was not applicable to them. The following statement, taken from the record, shows the admitted facts as to the course of business: The "When the rough material reached the mills, it was manufactured into finished staves, headings and hoops, and in this condition shipped to whoever purchased them. The purchaser uses them in making barrels, casks, etc. wastings in the finishing of said articles from the rough material were either disposed of for firewood, or destroyed. When the rough ma*But there is nothing to show that the terial left the woods, a bill of lading was issued rough material rates wrought any discrimina- from the woods to the mill. When the rough tion against the railway companies. They material reached the mill, it was finished into were applicable upon all railways alike. If some or all of the articles described, when it there was not in the least intimating that was stacked in the yards or placed in kilns to dry. there was undue discrimination as against The process of manufacturing and drying occupied several months, or on an average small shippers or those who had no occasion this process would be gone through with, the to obtain transportation for the manufactur- finished products sold and shipped to the pured product over the line of the same carrier, chaser, in about five months from the date the this was not a matter of which the railways rough material was received at the mill. The could complain. It is most thoroughly estab- claimants classified the different parts after they lished that before one may be heard to strike came from the mill completely finished, and down state legislation upon the ground of made sales from such stock. The markets for its repugnancy to the federal Constitution he the manufactured articles were almost altogethmust bring himself within the class affected er in other states than Arkansas, or in foreign countries, and about 95 per cent. of the sale of by the unconstitutional feature. Plymouth finished articles, that is, of the total outbound Coal Co. v. Pennsylvania, 232 U. S. 531, 544, shipments, were made for delivery at points 34 Sup. Ct. 359, 58 L. Ed. 713; Jeffrey Mfg. outside the state of Arkansas, the remaining Co. v. Blagg, 235 U. S. 571, 576, 35 Sup. Ct. 5 per cent. being sold and delivered, or shipped 167, 59 L. Ed. 364; Mallinckrodt Works v. to points within the state of Arkansas. At the |