Brody Elahmar, 16, takes a class at Sanford Regional Technical Center and recorded a video of what seems to be a teacher making comments that Sanford school officials later called "inappropriate." Credit: Courtesy CBS 13

SANFORD, Maine — A Maine school district has fired a substitute teacher who was recorded arguing with a student about immigration.

Sanford School Department officials tell the Portland Press Herald the argument happened in an 11th grade classroom at the Sanford Regional Technical Center last week. The district fired the teacher following an investigation into the exchange.

[Video seems to catch Maine teacher making ‘inappropriate’ jokes to student]

In the video clip posted on Twitter, the student and teacher discuss a proposed wall along the U.S. border with Mexico. The substitute tells the student, “Oh, you’re getting kicked out of my country.” She later says the country has belonged to her longer and references President Donald Trump.

Officials are not identifying the teacher and the student.

The exchange follows Trump’s incendiary remarks about countries in Africa last week.

Follow the Bangor Daily News on Facebook for the latest Maine news.