We are asked to resolve a dispute between the town of Northborough (town) and the Mas-saéhusetts Electric Company (company) concerning the scope of a public safety by-law of the town which prohibits the installation throughout the town of “any poles and overhead wires and associated overhead structures upon, along or across any public way within the [town].” This by-law, which was adopted to be effective January 1, 1973, and is set forth in full in the margin,2 was enacted pursuant to the authority of G. L. c. 166, § 22C. The company does not challenge the general impact of the by-law, but it does contend, we think correctly, that, because of the definition of “poles and overhead wires and associated overhead structures” in G. L. c. 166, *474§ 22A (e), as appearing in St. 1969, c. 884, § 1, the by-law does not forbid the installation of new overhead wires to serve new uses from poles lawfully installed before January 1, 1973. This action seeking a declaratory judgment was reported to the Appeals Court, without decision, on the pleadings and a statement of agreed facts. We transferred the case here on our own motion.
Section 22C, which generally authorizes a municipality to forbid new overhead utility facilities (except by way of replacement or upgrading of existing facilities) is part of comprehensive legislation adopted in 1969 concerning municipal regulation of overhead utility plant “upon, along or across” public ways. See St. 1969, c. 884, § 1, inserting §§ 22A-22N of G. L. c. 166. Section 22D of G. L. c. 166, for example, authorizes a municipality to adopt a local regulation which requires a utility to remove its existing overhead facilities in all or part of the municipality. The town has not acted to eliminate overhead utility plant in all or any part of the town, but it has adopted a prohibition against new overhead plant on or along public ways in the town. The town’s prohibition against “poles and overhead wires and associated overhead structures” is as broad as § 22C permits.
We are presented with the narrow question of interpreting one statutory exemption in the definition of “poles and overhead wires and associated overhead structures,” on which the company relies. In interpreting the statute, we recognize that failure to remove a wire installed in violation of the by-law is a crime subject to substantial criminal penalties3 and that, therefore, any ambiguity in the by-law or statute must be construed against the *475town. Nickerson v. Boston Elevated Ry., 319 Mass. 220, 223 (1946). Gagnon v. Ainsworth, 283 Mass. 488, 490 (1933). Burke v. Board of Health of Holyoke, 219 Mass. 219, 221 (1914). See Leone v. Doran, 363 Mass. 1, 8 (1973)
Section 22A (e) defines “poles and overhead wires and associated overhead structures” to include wires generally, as well as many other items, and then lists certain exclusions. Among them are “wires (exclusive of supporting structures) crossing any portion of any underground utility district from which overhead wires have been prohibited, or connecting to buildings on the perimeter of such portion, when such wires originate in an area from which poles and overhead wires and associated overhead structures are not prohibited.”
Because new overhead plant is forbidden on, along or across public ways in the town, we think the entire town is intended to be what the statute calls an “underground utility district from which overhead wires have been prohibited,” even though existing wires are not prohibited. A new overhead wire is exempted, therefore, from the statutory definition if it “originate [s] in an area from which . . . [overhead facilities] are not prohibited.” The question for decision is whether a pole installed before January 1, 1973, to which a new wire is attached is in an area from which overhead facilities are not prohibited. By analogy to zoning principles, the poles with which we are concerned here are “nonconforming.” Like a “nonconforming use,” they are not prohibited. Thus the area where they exist is not an area in which overhead facilities are prohibited because § 22C forbids only new overhead facilities (except by way of replacement or upgrading). The reference in the statutory exception to an “area” where overhead facilities are prohibited rather than to a “district” where such facilities are prohibited suggests that the Legislature did not intend to limit the exemption only to new overhead wires *476originating in a district where new overhead facilities are not prohibited.
We think that the result we reach in construing this obviously ambiguous statutory language makes practical sense out of the statutory definition. A contrary result would require underground wires from an existing, permitted pole in order to serve a new use, although existing overhead wires from the same pole could be maintained. Thus a builder of a new home fronting on a public way along which there are existing overhead utility facilities would have to incur the extra cost of placing wires underground with little, if any, aesthetic or other advantage.* **4 In such a situation, the poles and wires serving others would remain. The process of “undergrounding” itself could create an inconvenience and produce an unsightly appearance, particularly if pavement must be dug up to serve a use on the opposite side of the traveled way from the pole location. Also, under the contrary construction, where a new use of utility service (not constituting an upgrading) is needed in a structure which has existing overhead service, that new use, although in the same structure, would have to be served by underground wires.5
If a municipality wishes to order the removal of existing poles and overhead service, it has the power to do so as provided in G. L. c. 166, § 22D. The town has not done so in this case.
*477A judgment should be entered in the Superior Court declaring that the company is not in violation of the town’s public safety by-law concerning underground wires if it attaches a new wire to a pole or overhead structure which was lawfully erected prior to January 1, 1973.
So ordered.
Reardon, J., dissents.
“The installation or construction by any utility except by way of replacement or up-grading of existing facilities of any poles and overhead wires and associated overhead structures upon, along or across any public way within the Town of Northborough is prohibited. Violation of this by-law shall be punished as provided in G. L. c. 166, § 22C.”
General Laws c. 166, § 22C, inserted by St. 1969, c. 884, § 1, provides in part: “Any person who fails to remove immediately any poles and overhead wires and associated overhead structures in violation of any such ordinance or by-law shall be punished by a fine of not less than one thousand dollars and not more than five thousand dollars for each consecutive fifteen day period during which his failure continues.”
Of course, any landowner who wished a new utility connection to be underground could arrange for it. We assume that the cost of such an underground connection would be greater than an overhead connection and that the customer, and not the utility (and ultimately its customers generally), would have to pay the difference.
The town apparently regards the prohibition of its by-law as extending only to a new wire which crosses the traveled portion of a public way and not to a new wire to a structure on the same side of the street as the pole. There is no basis for such a distinction in the by-law or in the statute.