Hong Kong CNN  — 

Police in northwestern China broke up the wedding of a 14-year-old girl whose parents allegedly tried to sell her into marriage with a stranger for a nearly $40,000 dowry, authorities said.

The teenager called police in Zhongning county, Ningxia region during the wedding on November 24 to say she was being forced into the illegal marriage against her will, according to a post by the local Justice Bureau Monday.

The post on social media platform WeChat described the local police’s “quick and clever” response to the call in a positive light, but has since been deleted after drawing controversy online.

Police and other local officials rushed to the family home of the groom, surnamed Lee, and stopped the ceremony, the post said.

The teenager’s parents – who had allegedly already bought gold jewelry with the money – returned the dowry to the groom’s family after mediated negotiations, police said.

The girl was also sent back to her parents, who police have not named.

Chinese law forbids the parent or guardian of anyone age under 18 from “allowing or forcing minors to marry or concluding engagements for minors.”

The legal age for marriage in the country is 22 for men and 20 for women, but there’s no specific penalty for breaching the law.

Legal experts say citizens have the right to choose whether and who they want to marry without outside interference or coercion, according to state-run People’s Daily.

Early marriage was customary in China’s feudal past, and even today, teenage brides and grooms are not unheard of in poor and rural regions, such as Ningxia.

But the incident has shocked urbanites, who criticized the girl’s parents for allegedly coercing her into marriage, saying they should be punished.

A study published last year in medical journal The Lancet found that in 2015, the rate of marriage in girls age 15-19 in China’s rural areas was three times higher than their urban counterparts, with lower education levels exacerbating the difference.

The study authors said a higher level of education reduces the risk of early childbirth for girls, but the education gap between rural and urban areas has not improved much in past decades.

Experts say many in rural areas recognize a marriage if the couple holds a ceremony and banquet, with official registration taking place once they are of age.

Many rural parents are keen for their children to tie the knot before they go off to work in factory towns – a common fate for many. This is especially true for sons who may struggle to find a partner due to China’s gender ratio imbalance – worsened by the former one-child policy and a traditional preference for sons – which has especially impacted rural areas.

According to the latest government data, there are nearly 35 million more men than women in China.

Additional reporting by CNN’s Katie Hunt.