The Pennsylvania Department of Environmental Protection (DEP) has issued permits for two controversial underground injection wells in the state, closing a roughly four-year fight in two counties nearly 100 miles apart.

“After a thorough review, DEP determined that both applications meet all regulations, are sufficient to protect surface water and water supplies, and would abate pollution,” said acting DEP Secretary Patrick McDonnell of the wells, which would dispose of wastewater generated during shale gas production.

DEP on Monday issued a permit for Seneca Resources Corp. to operate an injection well in Elk County’s Highland Township and for Pennsylvania General Energy Company LLC (PGE) to operate another in Indiana County’s Grant Township. The U.S. Environmental Protection Agency has regulatory primacy over all types of injection wells in Pennsylvania, but the companies still needed a permit from DEP to operate their wells. The agency also reviewed erosion and sedimentation control, stormwater management and disposal plans, the applications submitted to the EPA and the related permits.

The DEP issued the permits with special conditions, citing concerns about seismic activity related to injection wells in other states, such as Ohio. The additional requirements come after the DEP concluded earlier this year that hydraulic fracturing at a Hilcorp Energy Co. pad in western Pennsylvania triggered a series of micro-earthquakes in 2016. DEP issued a report with the findings from its investigation and said new permitting conditions would be likely in areas of concern for induced seismicity.

Seneca and PGE will be required to install a seismometer at the sites of their wells and keep operating, calibration, service and maintenance information available there, too. Data captured from equipment would be provided in real time to a seismic monitoring network and the companies have to submit a seismic event contingency plan, among other things.

Highland Township passed an ordinance banning underground injection wells that dispose of oil and gas wastewater in 2013, but new supervisors on the township’s board voted last year to overturn it in the face of a lawsuit Seneca filed. Similarly, a U.S. District Magistrate Judge in 2015 struck down an ordinance in Grant Township banning the disposal wells. The township filed an objection on March 7 to the PGE permit — which had been under review for nearly two years — with DEP.

Unlike nearby Ohio, where there’s more than 200 active underground injection wells, there’s less than 10 in Pennsylvania. DEP also permitted the Seneca and PGE wells at lower pressures and for formations farther from basement rock, which is more susceptible to induced seismicity.