An investigation has been launched into an upstate religious cult that allegedly forced children to work in a factory that produced goods that were then sold by Amazon, Wal-Mart and Whole Foods.

A team from the New York State Department of Labor Worker Protection Unit conducted an on-site investigation at Common Sense Farm, which is run by the cult Twelve Tribes.

It found “multiple violations” involving 12 minors who were working in the factory in Cambridge.

“As a result of these violations, the DOL has opened cases that could result in significant fines in the tens of thousands of dollars,” the Labor Department said.

The agency is also probing eight other Twelve Tribes communities and factories across the state, including in Coxsackie, Oak Hill, Oneonta, Ithaca and Hamburg.

“Every child under the age of 18 in this state has a right to be protected by the Child Labor Law, and we take our enforcement responsibilities seriously,” said Commissioner Roberta Readon.

The investigation was sparked by an “Inside Edition” exposé that aired Friday.

Secretly recorded video allegedly shows children as young as nine working an assembly line for the factory — which packages soaps and lotions for major brands, including Savannah Bee and Acure.

Other footage shows a 6-year-old boy struggling to pull a heavy wheelbarrow and pick potatoes at Common Sense Farm.

On its website, Twelve Tribes said it produces “organic body care products” in a large converted barn.

“We have seen this as an excellent way to strengthen families, as we turn our hearts to our children,” the site says.

Twelve Tribes has been fined by New York authorities in 2001 and 2006 for child labor-law violations.

The group, founded in 1972, is accused of using corporal punishment against the children — sometimes using spanking or a thin bamboo stick called “the rod of authority” — if they misbehave.

It describes itself as following “the pattern of the early church” and “truly believing everything that is written in the Old and New Covenants of the Bible and sharing all things in common.”

Twelve Tribes leaders denied forcing children to work, telling Inside Edition, “We don’t have factories.”

Community member Robert Racine said children sometimes spend time with their parents in the shop on the farm where they live.

“Likening those moments to oppressive industrial child labor that happens in 3rd world countries, not only takes them out of context but is also sadly inaccurate,” Racine wrote.

Acure said it would stop working with the cult, saying the “abhorrent” allegations “go against our values as a company.”

With Post Wires