In this Oct. 5, 2012, file photo. products labeled with Non Genetically Modified Organism (GMO) are sold at the Lassens Natural Foods & Vitamins store in Los Feliz district of Los Angeles. President Barack Obama on July 29, 2016, has signed into law a bill that will require labeling of genetically modified ingredients for the first time. The legislation will require most food packages to carry a text label, a symbol or an electronic code readable by smartphone that indicates whether the food contains genetically modified ingredients, or GMOs. (AP Photo/Damian Dovarganes, File)

President Barack Obama has signed into law a bill that will require labeling of genetically modified ingredients for the first time.

The legislation passed by Congress two weeks ago will require most to carry a text label, a symbol or an electronic code readable by smartphone that indicates whether the food contains genetically modified organisms, or GMOs.

The Agriculture Department has two years to write the rules, which will pre-empt a Vermont law that kicked in earlier this month.

Congressional passage came over the strong objections of Vermont's congressional delegation. Sens. Bernie Sanders and Patrick Leahy and Rep. Peter Welch argued that the measure falls short, especially compared with the tougher requirements in their state. While the bill gives companies the three options for labeling, the Vermont law would require items be labeled "produced with genetic engineering."

Advocates for labeling and the food industry, which has fought Vermont's law, have wanted to find a national solution to avoid a state-by-state patchwork of laws. While the food industry ended up supporting the final bill, many of the advocates did not, arguing that many consumers won't be able to read electronic labels and that there aren't enough penalties for companies that don't comply.

While there is little scientific concern about the safety of those GMOs on the market, advocates for labeling argue that not enough is known about their risks and people want to know what's in their food.

Genetically modified foods are plants or animals that have had genes copied from other plants or animals inserted into their DNA. The bulk of the nation's genetically engineered crops are corn and soybeans that are eaten by livestock or made into popular processed food ingredients such as cornstarch, soybean oil or high-fructose corn syrup.

The says 75 percent to 80 percent of foods contain genetically modified ingredients—most of those corn and soy-based. The Food and Drug Administration says they are safe to eat.