Seven fast food chains — including Arby's, Cinnabon and McDonald's — have pledged to end so-called "no-poaching" rules that have prevented employees from moving from one franchise to another within the same restaurant chain.

Washington state's Attorney General Bob Ferguson said Thursday the agreement could end the practice at roughly 25,000 restaurants nationwide.

The move will mean fairer hiring practices for "tens of thousands of low-wage" workers in the United States, Ferguson's office said. His office also said it will take legal action against franchises that violate the agreement, and the companies could face civil penalties or fines.

The fast food chains included in the agreement are Arby's, Auntie Anne's, Buffalo Wild Wings, Carl's Jr., Cinnabon, Jimmy John's, and McDonald's (MCD).

"No-poach" rules bar workers at franchise-owned restaurants from being hired by a separate franchise within the same chain.

Because such rules are usually laid out in company-franchise contracts, and not in worker agreements, employees have often been unaware they existed, Ferguson's office said.

Related: Why perks aren't the answer to employee retention problems

The rules have not prohibited fast food workers from taking a job with a different fast food chain — such as leaving an Arby's for a McDonald's location. But, according to Ferguson's office, they have for example prevented workers from going from one franchise-owned Cinnabon location to another where they might be offered more money.

Economists say this practice tamps down competition for workers, and therefore suppresses their wages, according to a press release from Ferguson's office. That violates provisions in Washington state's Consumer Protection Act, the release states.

Related: Why fast food chains sell Frankenfood

McDonald's previously promised to quit enforcing no-poach provisions nationwide, but the new agreement makes that pledge legally binding, Feguson's office said.

McDonald's pledged to remove all no-poach provisions in early 2017 and on Thursday said it was "please to cooperate" with Ferguson's office.

Inspire Brands, which owns Arby's and Buffalo Wild Wings, said it was "pleased" to work with Ferguson "to promptly resolve his concerns."

CNNMoney reached out to the other companies involved in the agreement but none immediately responded to a request for comment. None of the firms admitted any prior wrongdoing in signing the deal with Ferguson.

A spokesperson for Ferguson said in an email that his office "could take action with any of these seven franchises because the terms of the legal agreement say they will stop doing this nationwide."

But it's unclear to what extent Ferguson's office could enforce the agreement beyond Washington's borders. While attorneys general can enforce settlement agreements they reach with companies, it's considered very difficult to challenge conduct that occurs outside their home state.

Ferguson's office credited a 2017 New York Times report about no-poaching practices for prompting the investigation, and it said probes into anti-poaching practices by other fast food chains are ongoing.

In a separate move announced Thursday, 11 attorneys general co-signed letters sent to eight fast food chains — Arby's, Burger King, Dunkin' Donuts (DNKN), Five Guys Burgers and Fries, Little Caesars, Panera Bread, Popeyes Louisiana Kitchen and Wendy's (WEN). The letter requests additional information about the companies' use of no-poach rules.

Massachusetts Attorney General Maura Healey said in a statement that no-poach agreements "unfairly limit the freedom of fast-food and other low-wage workers to seek promotions and earn a better living."

"Our goal through this action," she said, "is to reduce barriers and empower workers to secure better-paying and higher-skill jobs."