SHANGHAI—Was she a callous mother less concerned about the safety of her child than the cost of repairing a window on her luxury BMW? Or did the media pounce on a rumor and portray her in an unsympathetic light to whip up a click-bait story?

The debate has been raging on social networks in China this week after a toddler was accidentally locked inside a BMW in the coastal city of Yiwu last weekend.

When firefighters arrived at the scene, two locksmiths were trying to open the car door to free the child. But the mother insisted they have more time to work before breaking the window, according to the Dushi Kuaibao newspaper, which first reported the story.

As the minutes ticked by, a crowd gathered around the car started to scold the woman, and some began questioning if she was worried about the cost of replacing the glass. The newspaper quoted a witness who speculated this must have been the reason for the delay.

Eventually, the firemen broke the window and the child was rescued. After the news story went online, people unleashed a torrent of criticism against the mother.

CCTV NEWS, the English language news channel of China Central Television, posted pictures on its Facebook page that appeared to show the incident.

According to the Wall Street Journal, reports of the incident had received more than 7.6 million views as of Thursday afternoon.

"Is the car or the life of the son more valuable?" said one person on Weibo, China's microblogs. "In order to save a child’s life, we should not hesitate to break the car, let alone the window."

"As a parent, I could never make it an hour seeing my own child crying inside the car! This mother must be of excellent psychological disposition," another person wrote.

On Wednesday, the mother, who has not been identified by the media, defended herself in an interview with another local paper, the Qianjiang Evening News, saying she had tried to break the window herself initially, but the noise frightened her son.

"Of course my son is the top priority, a piece of glass just cost a thousand [renminbi]," she told the paper.

A firefighter corroborated her story, saying the mother wanted to give the locksmiths more time to open the door to avoid scaring her son further.

When the mother’s side of the story came out, some of the venom online turned against the media.

"Unconscionable journalists and irresponsible editors, they are the culprits of rumors!" said one Weibo user.

"This is not the first time that the media reports indiscriminately to draw readers’ attention," wrote another. "Compared to a mother who hurried to save her son, the story that a BMW owner refused to break the car window for money has obviously more dramatic conflict."

As the wealth gap widens in China, many people on social media are quick to criticize those who appear to value money over everything else.

Several years ago, a contestant on a TV dating show gained notoriety when she proclaimed that she’d rather be crying in the backseat of a BMW than laughing on the back of a bicycle. And people expressed similar outrage online when photos of a motorcade of luxury cars for a wedding in the city of Wenzhou went viral.

The mother in Yiwu defiantly maintains the media are at fault, not her. "At first it's just on the local online forum in Yiwu, now it's all over China," she told the Qianjiang Evening News. "I demand that all the untrue posts and reports be deleted."