(Corrects number of drinking glasses in stores or not yet shipped in paragraph 12)

DETROIT - McDonald's Corp has recalled 12 million Shrek-themed drinking glasses in the United States after a federal agency warned consumers to stop using them because they contain the toxic metal cadmium.

Cadmium was found in the painted design of the movie characters on the glassware, which McDonald's outlets sold for about $2 each, according to the U.S. Consumer Product Safety Commission.

The glasses also were recalled in Canada. In Ottawa, the Canadian health ministry declined to say how many of the glasses had been recalled there and referred media queries to McDonald's Canada, which did not return phone calls.

A very small amount of cadmium can come to the surface of the glass, and in order to be as protective as possible of children, CPSC and McDonald's worked together on this recall, CPSC spokesman Scott Wolfson said in an email.

The CPSC said designs on the glasses, made by ARC International in Millville, New Jersey, contain cadmium and long-term exposure ... can cause adverse health effects. Cadmium is a known carcinogen that research shows also can cause bone softening and severe kidney problems.

The agency said no incidents or injuries related to the glasses have been reported, but McDonald's said it was recalling them as a precautionary measure.

Shares of the world's largest hamburger chain were off 1.2 percent at $67.07 on the New York Stock Exchange on Friday afternoon.

Wolfson did not specify the amounts of cadmium that leached from the paint in tests by the CPSC but said the levels were slightly above the new stricter guidelines under development by the agency. He said it was far less cadmium than the children's metal jewelry the CPSC previously recalled.

McDonald's said consumers who bought the glasses should visit the company website at www.mcdonalds.com/glasses or call 800-244-6227 beginning Tuesday for instructions on how to return them and get a refund.

The glassware was evaluated by an independent third-party laboratory which is accredited by the CPSC, and determined to be in compliance with all applicable federal and state requirements at the time of manufacture and distribution, the company said in a statement.

However, in light of the CPSC's evolving assessment of standards for cadmium in consumer products, McDonald's determined in an abundance of caution that a voluntary recall of the 'Shrek Forever After' glasses is appropriate, the company added.

McDonald's said about 7 million of the glasses had been sold and about 5 million were in stores or had not been shipped yet.

The sale of the 16-ounce glasses was part of the promotional campaign for the movie Shrek Forever After, which was produced by DreamWorks Animation and released last month by Viacom Inc's Paramount Pictures.

The glasses, which McDonald's began offering on May 21, came in four designs with characters from the film: Shrek, Fiona, Puss in Boots and Donkey.

Shrek, the fourth movie in the series about the lovable green ogre's adventures in his fairy tale land, opened May 21 and is currently the most popular movie in North America, having grossed almost $150 million through the end of May.

The CPSC was alerted to the problem through the office of U.S. Rep. Jackie Speier, a California Democrat, who was contacted by an anonymous source last week.

Our children's health should not depend on the consciences of anonymous sources, Speier said in a statement posted on her website. (http://speier.house.gov/)

Although McDonald's did the right thing by recalling these products, we need stronger testing standards, she said. Cadmium is a toxic substance that is extremely dangerous to the developmental health of children.

McDonald's last recall with the CPSC occurred in 2002, involving 100,000 Chicago Bears bobble-head figurines with paint that contained excess levels of lead.

(Reporting by Ben Klayman in Detroit, Jonathan Stempel in New York, Antonita Madonna Devotta in Bangalore, David Ljunggren in Ottawa; Editing by Lisa Von Ahn, Steve Orlofsky and Matthew Lewis)