Bolivia has lowered the legal working age to allow children to work from the age of 10 as long as they also attend school and are self-employed.
The law also permits 12-year-olds to be contracted to work for others. But they need parental authorisation.
Vice-President Alvaro Garcia Linera said the new legislation reflects the needs of Bolivia, one of the poorest countries in South America.
It also sets harsher punishment for violence against children.
The law sets a sentence of 30 years in jail for child homicide.
The measure, approved by Congress earlier this month, was signed into law by Mr Garcia in the absence of President Evo Morales, who was travelling to Brazil.
“President Evo [Morales] intervened to make sure we found a balance between the reality and the law, between rights and international treaties,” added Mr Garcia.
More than 500,000 children already work to supplement the family income in Bolivia according to the United Nations Children’s Fund (Unicef).
Many work cleaning shoes and selling food in stalls in La Paz and other Bolivian cities. But others face extreme conditions in mines and in agriculture fields.
Mr Morales’s socialist government hopes the law will help eradicate extreme poverty in Bolivia.
The International Labour Organisation says children under the age of 15 should not be allowed to work.
But it allows a minimum working age of 14 for developing countries.
“It would have been easier to pass a law in line with international conventions, but it would not be enforced because Bolivia’s reality has other needs and characteristics,” said Mr Garcia.
The ILO says it is studying the legislation to decide whether it breaches international regulations on child labour.