A California judge has ruled that children can still get toys with their Happy Meals.

The San Francisco judge dismissed a proposed class-action lawsuit that sought to stop McDonald's from using toys to market its meals to children in the Golden State.

The suit had been filed by Monet Parham, a California mother of two, and The Centre for Science in the Public Interest, a consumer group based in Washington.

The suit had claimed that the world's biggest hamburger chain was violating consumer protection laws and exploiting children's vulnerability by using toys to lure them to eat nutritionally unbalanced meals that can lead to obesity. The lawsuit did not seek damages.

McDonald's spokeswoman Danya Proud said that the lawsuit was without merit and detracted from "the important issue of children's health and nutrition".

"We are proud of our Happy Meals and will vigorously defend our brand, our reputation and our food," Proud said in the statement. "We stand on our 30-year track record of providing a fun experience for kids and families at McDonald's."

The Centre for Science in the Public Interest said in a statement that it will discuss with Parham whether to appeal.

The group called the use of toys to market food a "predatory practice that undermines parents, causes rifts in families and harms kids' health."

The suit, filed in the county of San Francisco, was dismissed by Judge Richard Kramer.

McDonald's shares were up 73 cents at 98.21 dollars in afternoon trading.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.