He was a toeless man in a heartless job.

A Hudson Valley immigrant missing his lower left leg and part of his right foot was callously canned after 30 years by his factory bosses after they refused to let anyone sit on the production line, a shocking lawsuit alleges.

Javier Amigon beat the odds to even get to this country. At the age of 25 he was maimed in a 1985 robbery in his native Mexico when two thieves tied him to railroad tracks, he said.

Unconscious from the beatings, he awoke underneath the train, his leg and foot mangled, as rescuers pulled him out.

A year after arriving in the US in 1988, Amigon was hired by the nail polish factory in Newburgh. The father of two — who uses a prosthetic for his left leg and thick bandages to cushion his partial right foot — worked as a topper, placing the caps on nail polish bottles.

He did this for three decades, with the help of a simple stool, which allowed him to periodically rest his legs as he worked.

Amigon said the stool did not interfere with his work. “It was very easy for me to work. I would be sitting and sometimes standing but it would be easier for me and I was happy the way I was working,” he said.

In fact, all the workers had access to stools, until six months after New Jersey-based Kirker Enterprises bought the facility in 2015.

One day, bosses confiscated the seats without explanation and tossed them in a dumpster.

“It was a really hard day for me,” Amigon, 58, told The Post via an interpreter.

“I was sitting there, and the second supervisor, she came in and approached and said in a mocking way, telling us our time was over working sitting down.”

Amigon attempted to stick it out, he said.

“I tried to do the work standing for four days, and eventually my right foot was bleeding and the skin was ripping,” Amigon said.

Despite several doctors notes, Kirker officials refused to give Amigon his stool back, claiming if they provided him with an accommodation, everyone employee would want the same, according to court papers.

The company fired Amigon in June 2016.

His wrongful termination lawsuit against Kirker was recently moved to Manhattan federal court. The US Equal Employment Opportunity Commission is also suing Kirker for disability discrimination in the case.

Amigon has been unable to find other work and being unable to support his family left him feeling “almost worthless,” said his lawyer, John Marsella.

The company did not return messages.