The plaintiffs are employees in the cloth room department of the Nashawena Mills, Inc., hereinafter called the employer. The employer is engaged in the manufacture and sale of cotton textile goods which are now produced principally for the United States. It and nine other companies, which manufacture similar goods, comprise an association known as the New Bedford Cotton Manufacturers’ Association. This association represents the major portion of the textile industry in New Bedford, and its member plants employ approximately eleven thousand persons in their production and maintenance departments. The association has for years conducted collective bargaining with the employees of the member plants through the New Bed-ford Textile Council. The association entered into a written contract in 1938 with the council which was then unaffiliated with any national organization. The council and its local unions later became associated with the United Textile Workers of America, a branch of the American Federation of Labor, and its contract with the manufacturers’ association was revised and contained provisions that all employees who are members of any constituent union of the council or of any union affiliated with the American Federation of Labor shall become and remain members in good standing of such unions; that employees who have entered the employment of the member plants since January 1, 1932, must become members of such unions within thirty days; and that all new employees must become members of the appropriate constituent union and must remain members in good standing during the term of the contract. ■ This contract was terminated on January 31, 1943. Thereafter, the national labor relations board directed that an election be held, and on April 14, 1943, as a result of said election, certified the Textile Workers Union of America, affiliated with the Congress of Industrial Organizations, more commonly referred to as the C. I. 0., as the collective bargaining representative of all employees employed in the maintenance and production departments of the ten member *162plants. The Textile Workers Union of America is a voluntary, unincorporated association, the members of which are fairly represented by its.-director, the defendant England. This local union and the manufacturers’ association entered into a written contract on June 19, 1943. Among other provisions, this contract provided that all employees shall, as a condition of continued employment in any member mill, be and remain members of the union in good standing; that employees who are not members of the union shall become members in thirty days; that present employees over fifty years of age who have been employed for at least ten years may, but are not required to, join the union; that present and new employees are not required to join the union if such employees cannot readily be replaced by the union; and that members of the union are to be given preference in hiring new employees. Employees of the defendant mills who are not members of the union have been solicited to join the local. The provisions of this contract have been fully explained to them. There is a shortage of mill operatives. Some of the plaintiffs have withdrawn from the present suit. The remaining plaintiffs are members of a rival union and do not desire to quit their employment or to join the defendant union. It is fairly inferablé that, if a supply of labor becomes available, they will be discharged unless they join the defendant union, which is ready to admit them to membership. A judge of the Superior Court reported his action in refusing to grant an injunction, and the trial judge, to whom the suit was submitted upon an agreement of all the material facts, reported the case to this court without making a decision.
The issue presented is whether the portion of the contract between the manufacturers’ association and the defendant union, providing for the employees’ becoming members of the union as a condition precedent to their continued employment, is valid and enforceable.
We need not pause to inquire as to what limitations recent legislation has imposed upon the common law right of an employer to deal directly with his employees and contract with them personally and, if he decided to hire any particu*163lar person, to agree upon the rate of pay, hours of labor, working conditions and the period, if any, of his employment, for we pass directly to the statutes that govern the rights of the parties in the present controversy. The principal aim and object of the Federal labor relations act and of our State labor relations law is the elimination of industrial conflicts and their consequent effect upon industry and trade, by encouraging collective bargaining and by protecting the full exercise by workers of their right of self-organization and to designate their representatives for the purpose of negotiating the terms and conditions of their employment. U. S. C. (1940 ed.) Title 29, §§ 151-166. Chapter 150A, added to the General Laws by St. 1938, c. 345, § 2. Both enactments brand as an unfair labor practice the discrimination by an employer in regard to hiring, tenure of employment or any term or condition of employment, in order to encourage or discourage membership in any labor organization, but he is not precluded from making an agreement with a labor organization (which has not been established, maintained or assisted by the employer through an unfair labor practice) "to require as a condition of employment membership therein,” if the labor organization has been duly designated or selected for the purposes of collective bargaining. Section 4 (3) of said c. 150A. U. S. C. (1940 ed.) Title 29, § 158 (3). The representatives selected and designated for the purposes of collective bargaining by the majority of the employees in a unit appropriate for such purposes "shall be the exclusive representatives of all the employees in such unit for the purposes of collective bargaining in respect to rates of pay, wages, hours of employment, or other conditions of employment.” Section 5 (a) of said c. 150A. U. S. C. (1940 ed.) Title 29, § 159 (a). The employer is required to negotiate with these representatives for the purpose of making a contract with them in reference to wages, hours and other conditions of employment. Section 4 (5) of said c. 150A. U. S. C. (1940 ed.) Title 29, § 158 (5). These statutory provisions permit the making of a closed shop contract under the conditions which have been mentioned and which *164the agreed facts in the instant case showed were observed by the manufacturers’ association and the defendant union.
Under said c. 150A, the common law right of an employer to refuse to deal with representatives of his employees has been limited, Walton Lunch Co. v. Kearney, 236 Mass. 310, 313; Cornellier v. Haverhill Shoe Manufacturers’ Association, 221 Mass. 554, 560, although he is not now compelled to make a contract with them, National Labor Relations Board v. Jones & Laughlin Steel Corp. 301 U. S. 1; National Labor Relations Board v. Sands Manuf. Co. 306 U. S. 332, but if he agrees with them he can be required to execute a written contract embodying the agreement, as putting- the agreement in permanent form will tend to prevent future controversies. H. J. Heinz Co. v. National Labor Relations Board, 311 U. S. 514.
' The validity of a closed shop agreement, if freely and voluntarily made primarily for the mutual advantage of the parties, has always been upheld and enforced, even if the opportunity for securing employment by other workmen, not members of the contracting union, may thereby be greatly restricted or practically destroyed. Such an agreement has been recognized as a legitimate means which a labor union may employ to secure for its members all the work of their employers that they are competent to perform. Pickett v. Walsh, 192 Mass. 572. Hoban v. Dempsey, 217 Mass. 166. Tracey v. Osborne, 226 Mass. 25. Shinsky v. O’Neil, 232 Mass. 99. Smith v. Bowen, 232 Mass. 106. Ryan v. Hayes, 243 Mass. 168. Goyette v. C. V. Watson Co. 245 Mass. 577. A. T. Stearns Lumber Co. v. Howlett, 260 Mass. 45. Walter v. McCarvel, 309 Mass. 260. Fashioncraft, Inc. v. Halpern, 313 Mass. 385. National Labor Relations Board v. Lion Shoe Co. 97 Fed. (2d) 448.
The defendant union had been selected and designated by- a majority of the employees of the bargaining unit to which the plaintiffs belonged, and in making the contract with the association the union was acting not merely for its own members but as the representative of all the employees included in the said unit. International Associa*165tion of Bridge, Structural & Ornamental Iron Workers v. Pauly Jail Building Co. 118 Fed. (2d) 615, 619. McQuay-Norris Manuf. Co. v. National Labor Relations Board, 116 Fed. (2d) 748, modified on other grounds, 119 Fed. (2d) 1009. National Labor Relations Board v. Knoxville Publishing Co. 124 Fed. (2d) 875. The plaintiffs, together with those in the same unit, had surrendered to the defendant union their right to deal individually or through representatives other than the defendant union with their employer in reference to wages, hours of labor or other working conditions, as long as the certification of the defendant union as their accredited representative stands. It has been said that such a union acts as the agent or attorney of all the employees and not merely for its own members in negotiating and concluding an agreement with the employer. McQuay-Norris Manuf. Co. v. National Labor Relations Board, 116 Fed. (2d) 748. National Labor Relations Board v. Knoxville Publishing Co. 124 Fed. (2d) 875. As already pointed out, the execution of a closed shop agreement was permissible, § 4 (3) of said c. 150A; U. S. C. (1940 ed.) Title 29, § 158 (3), and the union as the exclusive collective bargaining agency of all the employees had whatever power was reasonable and necessary to perform fully its functions. It had the right in behalf of the employees to determine the working conditions, and this we think included authority to agree upon a closed shop provision as one of the terms of the contract with the employer. Indeed, the defendant union was expressly designated by the national labor relations board as “the exclusive bargaining representative of all such employees for the purpose of collective bargaining, in respect to rates of pay, wages, hours of employment, and other conditions of employment.” It would be strange if an employer, who is required to enter into negotiations for a contract with the designated union and who in the event that the execution of a contract results is bound to observe its terms and provisions, would not be able to enforce the contract which settled wages, hours of labor and other working conditions because he agreed with the union to conduct a closed shop. To set aside a contract upon that *166basis would be contrary to the public policy of the nation and of the Commonwealth, and would be inconsistent with the avowed purpose of both the Federal and State legislation. There is nothing in the plaintiffs’ contention that the defendant union was without power to execute a closed shop agreement. M & M Wood Working Co. v. National Labor Relations Board, 101 Fed. (2d) 938. National Labor Relations Board v. Acme Air Appliance Co. Inc. 117 Fed. (2d) 417. Teller, Labor Disputes and Collective Bargaining, § 324.
The present case is distinguishable from Berry v. Donovan, 188 Mass. 353, upon which the plaintiffs rely, not only for the reasons mentioned in Shinsky v. O’Neil, 232 Mass. 99, but also upon the additional ground that the plaintiffs cannot complain of the threatened enforcement of a contract lawfully executed by their own representative acting within the scope of its authority. In these circumstances, the solicitation by the defendant union to the plaintiffs to become members in order to continue their employment was not violative of G. L. (Ter. Ed.) c. 149, § 19. Such conduct by the certified union was within the permissible area of economic conflict.
The contracts of employment of the respective plaintiffs were apparently at will, but they were subject to the governing principles of law by which the terms of their employment in reference to wages, hours of labor and other conditions of employment might be superseded by a ■ new collective bargaining agreement. The plaintiffs cannot insist that their contracts of employment at will restrict the Legislature from enacting laws in the interest of the general public which may so deal with the master and servant relationship as to effect changes in the terms of their employment. Salem v. Maynes, 123 Mass. 372. Akins’s Case, 302 Mass. 562. Opinion of the Justices, 30Mass. 562.
As there is nothing contained in the bill that sufficiently sets forth any claim that the contract is illegal because it creates a monopoly in the textile labor market in New Bedford, we deem it unnecessary to discuss that matter or *167any other points urged by the plaintiffs that are not now material in the view we take of the case. Berenson v. H. G. Vogel Co. 253 Mass. 185. A. T. Stearns Lumber Co. v. Howlett, 260 Mass. 45. Apex Hosiery Co. v. Leader, 310 U. S. 469. United States v. Hutcheson, 312 U. S. 219.
The denial of a temporary restraining order was proper and a final decree must be entered dismissing the bill with costs.
Ordered accordingly.