The free flow of workers between companies is central to economic growth and innovation. Yet employers are increasingly taking legal action to prevent former employees from using knowledge and skills learned on the job.

More and more frequently, firms are asking new hires to sign post-employment agreements, which prevent former employees from working at rival firms or starting up their own companies in the industry. And U.S. state policymakers have aided and abetted these efforts by changing the law to enable employer control over workers’ knowledge. States that continue to side with controlling firms over skilled employees are hampering their economic prospects and inviting brain drain to more enlightened locales.

While noncompete and non-disclosure clauses were once standard only in the employment contracts of key executives and technical personnel, many firms now require a wide range of employees to sign them including, in some cases, even yoga instructors, designers and camp counselors.

Some of these restrictions are drafted as non-solicitation or non-dealing clauses precluding the employee from dealing with the former employer’s customers and others are drafted as restrictions on using any information learned on the job. And more firms are going to court to prevent former employees from working at rivals, charging that allowing them to do so would inevitably reveal proprietary trade secrets. The number of lawsuits filed over noncompete agreements and trade secrets has increased dramatically since 2000.

This trend has been fueled not only by the contemporary talent wars and the much debated skills gap, but also by changes in the law that have expanded employers’ control over employees’ knowledge. Although it might seem that greater control and stronger enforcement are beneficial—it is important for firms to protect key trade secrets, after all—the evidence shows that these changes critically undermine employee incentives to learn and innovate.

The law governing trade secrets and noncompete agreements is largely state law and it varies significantly from state to state. In California, for example, employee noncompete agreements are generally not enforced and trade secret enforcement is relatively narrow. Economics research shows that these policies are a key reason why Silicon Valley startup firms succeed relative to tech companies in many other states. Despite differences from state to state, however, the last two decades have seen a significant expansion of trade secret law.

First, many states have adopted a broader notion of the range of employee knowledge that the employer can seek to protect. In the past, trade secret law only protected well-defined knowledge such as the formula for Coca Cola or the code of software programs; now, in many states, the law also extends to cover less well defined knowledge, such as employee know-how, customer relations, basic skills, and knowledge that is not used commercially. For example, in many states, trade secrets now include lists of actual or potential customers and suppliers, as well as pricing lists and marketing strategies, making it virtually impossible for a former employee to compete over clients.

Second, in some states, such as Illinois and Florida, a firm can take legal action against a former employee who has not actually misappropriated secret knowledge; all that is necessary is a “substantial threat” of misappropriation or a claim that the former employee will “inevitably disclose” secret information. For example, IBM got a court to enjoin a former IBM executive from taking a job at Apple; the executive had managed semiconductor and server engineering at IBM and IBM argued that he would inevitably disclose trade secrets in his new job managing iPod and iPhone engineering. In this way, firms can prevent former employees from taking jobs in the same industry, even when employees have not signed a noncompete agreement or when noncompete agreements are not enforceable.

Third, some firms have gotten federal authorities to initiate criminal proceedings against former employees under the Economic Espionage Act. For instance, last year a former Goldman Sachs computer programmer was sentenced to eight years in prison for saving some of the files he worked on to his own computer account. Currently, Congress is considering a further expansion by allowing civil lawsuits and injunctions in federal courts.

The law has given employers new powers over employee knowledge and firms are increasingly using these powers. However, economic researchers have firmly established that these changes are shortsighted both as a matter of public policy and firm strategy. Indeed, empirical evidence shows that overall these changes have not been good for firms or for society. Why? Because firms need to strike a delicate balance between protecting secrets and encouraging employees to learn new skills and knowledge. Employees’ incentives to learn on the job are weaker if they cannot use that knowledge later in their careers. They invest less in acquiring knowledge, reducing their skills and innovativeness.

Evidence shows aggressive enforcement leads to less learning, a loss of talented people, and less innovation in the long run. Stronger enforcement of noncompete agreements and trade secret law also result in lower pay and reduced employee mobility. That might seem like a benefit to employers, but that too is a double-edged sword: it also means lower incentives to learn on the job and greater difficulty hiring talented workers. Indeed, researchers studying state-to-state differences find that states with stronger enforcement of noncompete agreements have a “brain drain” effect: inventors tend to migrate to states with weaker enforcement, and that trend is especially strong among the most productive inventors. Not surprisingly, stronger enforcement is also associated with less investment in capital and R&D.

Instead of relying on the threat of litigation, today’s most innovative companies are finding creative ways to positively incentivize and motivate their employees, such as Zappos’ peer-to-peer reward program, Qualcomm’s patent reward system, or Starbucks’ employee tuition reimbursement plan. Companies are also increasingly identifying the ways in which their former employees, similar to university alums, can strengthen the firm’s ties and collaborations as well as aid new recruitment.

These findings and developments provide a stark message to managers: the law provides an increasingly powerful tool to control the use of knowledge that former employees have learned on the job, but it is a tool that should only be used sparingly. Managers need to protect real trade secrets, but overly aggressive enforcement undermines employee motivation, makes hiring talent more difficult, and undercuts firm innovativeness. Excessive use of post-employment restrictions or overly aggressive trade secret litigation against former employees amounts to giving the legal department too much control over human resources policy. The result may be less innovation and a depletion of human capital.