A city teacher repeatedly trashed President Trump to his class before last November’s election — and a fed up student recorded him in the act, The Post has learned.

The Special Commissioner of Investigation probed Susan Wagner HS teacher Alfred Teutonico after a student said he used class time to call Trump a “rapist,” and a “dictator,” documents show.

The teen told investigators Teutonico (inset) “spent the first two to three minutes of each class ‘bashing’ Donald Trump,” an SCI report says.

“Student A’s father sent an e-mail message to the assigned investigator which attached Student A’s notes,” the report states. “Student A recorded comments Teutonico made about Hillary Clinton and Donald Trump.”

Probers questioned other students about Teutonico’s conduct, including one who recalled him bristling at a classmate’s “Make America Great Again” cap.

“Teutonico challenged the [cap-wearing] student about the policies behind the hat,” the report states, adding the complaining student “thought Teutonico’s conduct was inappropriate.”

The teacher acknowledged to probers that he occasionally opined on the election in class. The SCI concluded he made “political comments” that “were unrelated to the topic of the class lesson.”

Teutonico was issued a letter of reprimand, according to the Department of Education. He declined to comment.