Companies operating in California cannot make employees sign contracts promising not to work for a competitor, a state appellate court ruled.

Wednesday’s decision in Raymond Edwards II v. Arthur Andersen LLP, No. B178246, rejects 20 years of federal case law that had held the non-competition agreements were legal if they were crafted narrowly enough that an employee who left a company still could work in his or her profession.