MEXICO CITY – A 10-year-old Indian street vendor whose humiliation by a city inspector tugged on the heart strings of Mexicans after a video of it appeared on social media was showered Friday with attention and the offer of a scholarship.

The video shows the poor, sandal-clad Tzotzil boy selling candy, cough drops and apparently cigarettes out of a wicker basket in Villahermosa, the capital of the Gulf coast state of Tabasco. State officials say the boy, Manuel Diaz Hernandez, was trying to earn money to buy his own school supplies.

A city inspector, identified as Juan Diego Lopez, spots the boy, confronts him and takes several packs of cigarettes from his basket. It is prohibited in Mexico for minors to buy or sell cigarettes.

In the video, Manuel can be seen weeping inconsolably as the inspector forces him to take all the candy in his basket, handful by handful, and toss it on the pavement. The cost of the candy and cigarettes could well be more than the boy would earn with a week’s work.

As the inspector walks off with the boy’s cigarettes, another man steps forward to help him try to pick up the sweets, and Manuel collapses into a squatting position, covering his face with his arms, rocking back and forth and sobbing loudly. The encounter took place on Monday.

The video was viewed hundreds of thousands of times over the last few days, and on Friday the governmental National Human Rights Commission announced it would investigate the case. The city fired the inspector.

It was the latest victory for social media in winning some measure of justice in Mexico. In recent years, social media have exposed a number of scandals and instances of mistreatment that often would have gone overlooked in the past.

“Any form of violence against children is totally unacceptable, especially when directed against Indians, who are one of the most vulnerable groups in the country,” the rights commission said in a statement.

The Tabasco state prosecutors’ office said the boy’s aunt, Maria Diaz Diaz, said she had brought Manuel to Villahermosa about 10 days earlier. She said the boy lives with his grandparents in the Tzotzil Indian village of San Juan Chamula, in neighboring Chiapas state, and wanted to work during his summer vacation to raise money for school supplies in the fall.