SEATTLE — Washington state will phase out marine farming of Atlantic salmon and other nonnative fish by 2022 under legislation signed Thursday by Gov. Jay Inslee.

Net pens growing Atlantic salmon in state waters have operated for several decades but the practice came under heavy criticism after tens of thousands of nonnative fish escaped into waterways last summer.

Inslee has said the risks are not acceptable given the high priority — and hundreds of millions of dollars spent — on bringing back declining populations of native Pacific salmon runs.

The legislation sponsored by Rep. Kristine Lytton, an Anacortes Democrat, would end state leases and permits for operations that grow nonnative finfish in state waters when current leases expire.

It targets Canada’s Cooke Aquaculture Pacific, the largest producer of farmed Atlantic salmon in the U.S., whose net pens in northwest Washington collapsed Aug. 19.

“While our company and our rural sea farming employees are deeply disappointed by the Governor’s decision to ignore the science and sign the bill, we will certainly respect the wishes of the legislature,” Cooke’s vice president Joel Richardson said in an emailed statement Thursday.

He added that the company will “take the time we need to fully evaluate our operations and investments in Washington and explore all our available options.”

State officials in January blamed Cooke’s negligence for failing to maintain its net pens. They said the escape of the salmon put the state’s ecosystem at risk and fined the company $332,000. Up to 263,000 invasive Atlantic salmon escaped into Puget Sound, raising fears about the impact to native Pacific salmon runs.

Cooke currently holds two leases with the state that both expire in 2022. The state canceled two other Cooke leases in recent months following inspections at those facilities.

Environmental groups and others cheered the legislation Thursday.

“This was a major step forward to restore the health of Puget sound and our wild salmon,” said Kurt Beardslee, who directs the Wild Fish Conservancy.

The Washington Fish Growers Association had urged the governor to veto the bill, calling it a drastic measure to ban entire farming sector that would put hundreds of rural workers out of jobs.

Initiative activist Tim Eyman has filed two proposed referenda with the state that would put legislation phasing out nonnative finfish farming to the people for a vote.

Last month, Richardson told state lawmakers that Cooke would be able to seek damages under a provision of the North American Free Trade Agreement if the measure passed. He said the bill would strip the Canada-based company of its $76 million investment in an unfair way.

At Thursday’s bill signing in Olympia, Inslee vetoed a section of the bill that said, in part, that the legislature would further study marine finfish aquaculture. Inslee said it wasn’t needed and he didn’t agree with all the assertions made in it.

Washington state now joins Alaska, which has banned commercial finfish aquaculture. Oregon and California do not have commercial salmon net pen operations.

Marine aquaculture is promoted by the federal government and others as a sustainable solution to feed growing demand worldwide for seafood. The U.S. currently imports about 90 percent of its seafood and half of that is farmed.

Paul Doremus, NOAA Fisheries’ deputy assistant administrator for operations, called last summer’s fish escape “an unfortunate situation.” But he said an interview this month that “aquaculture can and is being done very well and we should make it a bigger part of what’s happening in the U.S.”

John Volpe, associate professor of environment studies at the University of Victoria, said this month that there are too many issues.

“I’ve long argued that salmon farming in North America is in search of a problem. It comes with a boat load of issues. It’s not easy to justify,” he said.

Kenneth Warheit, who supervises the genetic and health laboratories for the Washington Department of Fish and Wildlife, said he thinks “that Atlantic salmon aquaculture in the state of Washington poses a low risk to our native salmon.”

Inslee, however, has said that the risks might be low but they’re not acceptable.