Transport bosses have been accused of "sexualising" children after a safety campaign featured a cartoon of a little girl in a hijab – a garment normally reserved for female Muslims when they reach puberty.

Transport for London (TfL), which runs the capital's tube and bus networks, has been criticised by Muslim women's groups for the image, which featured in £2m ($2.6m) road safety campaign aimed at nursery-age children.

The character, Ramzi, is a preschooler who wears a yellow hijab. She features in books and online materials, which were distributed and promoted throughout children's nurseries, The Times reports.

Gina Khan, an advocate of Muslim women's equality, said: "You are sexualising a four-year-old girl. It is as simple as that. The reason a female is covered is so men don't look at her. How can you integrate in society if you have a four-year-old girl wearing a hijab?"

"It's like trying to get that child to try to grow up far too quickly. A child needs to be treated like a child," said Shaista Gohir, chairwoman of the Muslim Women's Network UK.

The hijab is intended to preserve Muslim women's modesty in front of men – girls do not typically wear them until they reach puberty.

The campaign was launched when Boris Johnson was London Mayor and chair of TfL. His successor, Sadiq Khan, was made aware of the image by The Times. He apologised on behalf of the organisation.

TfL has confirmed it will stop using the images, which campaigners say could send a message to Muslim girls that they should be covering their hair.

Aisha Ali-Khan, a Muslim women's campaigner, said whoever produced the book needed diversity training.

TfL hijab road safety cartoon
The character Ramzi at her friend's grandmother's house TfL

She said: "The hijab is a Saudi-isation of British Muslim identity. If you are a Muslim girl and look at these images and see this girl is Muslim and she is wearing a hijab and you aren't, you will think there's something wrong with you. It is far too young. You are a child. What are you being modest for?"

Ramzi was one of many ethnically diverse characters to feature in the Children's Traffic Club campaign. She is friends with a Chinese girl, also three or four, and can be seen visiting her grandmother's house.

A TfL spokeswoman said: "We apologise for any offence caused by this content and we will not use these designs in future."