For the first time, consumers will be able to find out whether or not their food contains genetically modified organisms (GMO).

On Thursday, the U.S. House of Representatives passed legislation calling for a federal mandatory labeling standard of foods containing GMOs by a vote of 306-117, ending the long-standing debate over how and if food products should be labeled. The legislation, passed in the Senate last week, now awaits the approval of President Barack Obama. The White House says the president is expected to sign the bill.

The measure compels manufacturers to reveal if a product contains genetically modified ingredients through the use of a text label, a symbol or electronic code readable by a smart phone such as a QR code. The bill preempts other states from passing similar legislation and supersedes the Vermont GMO labeling law which went into effect this month. Many in the food industry supported mandatory labeling at the federal level in order to avoid a patchwork of state-by-state laws. USDA will have two years to write the rules.

The bill received the support of the food industry which lobbied for a federal standard to avoid a patchwork of differing state laws. However, many consumer groups and labeling advocates oppose the bill, arguing the electronic codes will be difficult for consumers to read.