The city has lost a four-year, $1 million battle to fire a teacher arrested in the Occupy Wall Street protests.

David Suker, a US Army veteran who taught at-risk youths in The Bronx for 14 years, was removed from the classroom in December 2011. He was charged with riling up students during an NYPD presentation at a school town-hall meeting by complaining he had been roughed up by cops, showing a scar on his head, and exchanging high-fives and fist bumps with teens.

Suker was also charged with failing to immediately report one of his five Occupy Wall Street arrests in Washington Square Park on Nov. 2. He notified the Department of Education three days after getting out of jail.

But now Suker, 47, has won his job back — and $260,000 in back pay.

“I’m no angel, but I’m also a great teacher and a loving father who believes in the founding ideals of this country. I’ve served in the military and I’ve served in public schools for these beliefs. I deserve justice, and I feel now I’ve been vindicated,” he told The Post.

Suker was terminated in August 2012 after the DOE hit him with additional charges of mishandling two unruly students three years earlier, and 11 absences deemed excessive. Suker was the only teacher in a GED program serving troubled students ages 17 to 21, many released from prison, and had an otherwise spotless record.

The DOE also had investigators secretly follow Suker’s 15-year-old daughter from her mother’s Bronx home to a Harlem high school, and interrogate her. Suker, a divorced dad, was accused of falsifying his address to enroll her in schools since kindergarten, although she passed entry exams.

Suker appealed his firing in Manhattan Supreme Court. Judge Alice Schlesinger tossed out the most serious charge, the record falsification, as years too late. She found Suker a good teacher who deserved to be punished, but not fired.

Last week, another arbitrator set his fine at $7,000.

But the case cost the city an estimated $1 million, Suker and his lawyers say. Besides the back pay, the DOE paid Suker for more than two years to sit idle, hired substitutes, and racked up extensive legal expenses.

“The time and resources that the DOE wasted to get a $7,000 fine is completely absurd and outrageous,” said Suker’s lawyer, Maria Chickedantz.

The DOE had no comment. A spokesman said Suker “remains reassigned.”