BANGOR, Maine — The candidates are controversial, the claims are outlandish and the rhetoric has veered to the violent and the obscene. And thanks to modern communications, most of it has been distributed far and wide for easy consumption by young and old alike.

For teachers, the task of showing children how to interpret the hyperbole and communicate their political beliefs in a civil, productive way has been an enormous challenge during what many believe is the most divisive and unpredictable presidential race in modern U.S. history.

“This has been a really tense election,” Geoff Wingard, co-chairman of Bangor High School’s history department and a world geography teacher, said. With students in classrooms representing the gamut of political opinions, he and his fellow educators have had to set ground rules to ensure discussions stay productive and don’t get out of hand.

“We want to include everybody’s voice, [and] we want to be respectful when we talk about these things, but we want to talk about them critically,” Wingard said. “Hopefully students have responded. I think they have.”

The news stories and accusations coming out about the 2016 presidential election have been increasingly controversial and at times vulgar — laden with sexually demeaning comments, heated immigration rhetoric, name calling and allegations of sexual assault.

“Students have handled these issues, by and large, maturely, and we’ve really seen ourselves as facilitators of this conversation,” Wingard said.

Wendy Steele, a teacher for 20 years at King Middle School in Portland, is in her first year leading sixth- and seventh-grade social studies classes.

“Students have already made up their minds,” she said Thursday. “They have heard enough from the media, parents and others to have formed their own opinion even before they entered school in August.”

She said she has been trying to teach students how elections and the political process work, allowing them to gain knowledge to create their own opinions.

“They know it’s OK to disagree with one another and align themselves with one candidate over another,” Steele added. “However, it’s important to remember what makes our country great is that people are involved, and if you make someone feel bad for what they think, believe or who they want to support, you are taking away the freedom all citizens should have to voice their opinions.”

Schools and teachers across the country have reported racial and political tensions on the rise this campaign season, according to Becky Pringle, vice president of the National Education Association, which represents about 3 million U.S. educators and is the largest labor union in the country. NEA urges teachers to be nonpartisan in their teaching, but the rhetoric of this election has made that difficult, she said Thursday.

“It’s been such a struggle for them, because you cannot pick up a newspaper and or turn on a TV or radio without seeing some of this damaging language,” Pringle said. “We’ve never dealt with a campaign like this.”

The efforts to keep campaign vitriol away from students goes beyond just classroom instruction. Some schools have decided to stay closed on Election Day this year or to have polling places moved away from schools in order to distance their students from potential politically charged confrontations, according to an Associated Press report.

Pringle cited several national instances of rival sports fans shouting “build the wall” at Hispanic high school athletes as well as students airing concerns about their parents being deported. Other students have reported falling victim to bullying based on who they support for the presidency. Older students have been expressing concerns about what the fallout could be if Trump refuses to accept the results of the election.

“Teachers have been trying to put those concerns at ease and bring calm,” Pringle said. “We look for the leader of our country to be a good role model for our kids, and what they see is not that.”

As educators work to mitigate the impact that the tone of this year’s presidential contest has on their students, schools and national education groups nonetheless continue with an election year tradition of teaching the future voters about the process by having them participate in simulated elections.

This week, schools across Maine held their own mock elections and, with the help of the secretary of state’s office, tabulated the results. More than 26,000 students cast ballots and gave Donald Trump a slight edge over Hillary Clinton, 41.6 percent to 40.3 percent, in the presidential race. Full results are available at maine.gov/mockelection.

At Bangor High School, however, students gave the edge to Clinton — 323 votes to Trump’s 247.

Secondary school students are pretty accurate when it comes to predicting the results of elections, if the results from Scholastic’s mock national elections are any indication.

Every presidential election year Scholastic, a firm that publishes books and teaching materials for schools, sponsors a national mock election. Students who have participated have accurately predicted the results in the past 13 presidential contests. The last time they were wrong was when John F. Kennedy beat out Richard Nixon in 1960. Before that, they missed Harry S. Truman’s 1948 win over Thomas E. Dewey.

This year, the 153,000 students who took part nationwide in Scholastic’s mock election picked Clinton in a landslide — 52 percent to Donald Trump’s 35. The contingent of Maine students who voted in the Scholastic election selected Clinton over Trump, contrary to the results of the separate statewide mock election organized by the Maine secretary of state’s office.

Students’ accuracy in predicting election results isn’t all that surprising, according to political scientists. Their political leanings tend to mirror the opinions of their parents, Gallup polling has shown, but that can change for some as they approach adulthood and head out on their own.

“Few kids completely abandon the conversations they were brought up with,” Wingard said. “They’re engaged in this stuff. These are dinner table conversations.”

Follow Nick McCrea on Twitter at @nmccrea213.