(Reuters) - General Mills Inc is recalling 1.8 million boxes of gluten-free Cheerios cereal because they may contain wheat, which can cause adverse reactions in people with gluten allergies.

The company said on Monday it was recalling the original and honey nut flavored varieties of Cheerios produced on certain days at its Lodi, California facility, saying wheat flour may have been accidentally added to its gluten-free oat flour system at the facility.

The incident occurred when the facility lost rail service and the company's gluten-free oat flour was being off-loaded from rail cars to trucks for delivery, said Jim Murphy, president of the company's cereal business, in a blog post on General Mills' website. He said it was isolated event and a result of human error.

"We sincerely apologize to the gluten-free community and to anyone who may have been impacted," Murphy said.

Ingestion of gluten, a protein found in wheat, barley and rye, by individuals with celiac disease causes an autoimmune response that attacks the small intestine, damaging the body's ability to properly absorb nutrients.

General Mills, like others in the industry, has been changing its brands to appeal to consumers who are increasingly seeking less-processed, healthier food. In particular, the cereal business has proven problematic as some U.S. consumers have shifted to other breakfast alternatives.

Gluten-free cereal is one way General Mills is trying to bring people back to the category and take market share from competitors. The company is transitioning five varieties of Cheerios to gluten-free and investing significantly in promoting the new products. On its last earnings call in September, the company said that gluten-free Cheerios would be "one of the largest merchandising events in our cereal business's history."

In a research note, JP Morgan analyst Ken Goldman estimated that the recall accounted for 1 percent of annual Cheerios production, an amount he called "not insignificant."

"We are not sure how costly the recall will be," he said. "Our biggest concern is over reputational risk, because the new gluten-free Cheerios just launched."

A company spokeswoman said General Mills did not yet have a cost estimate for the recall.

General Mills' shares fell 18 cents to $57.04 in after-hours trading.

(Reporting by Anjali Athavaley in New York and Ramkumar Iyer in Bengaluru)