by Milton J. Valencia - Boston Globe Staff

Brockton fourth-graders learn about sacrifice as their teacher leaves the classroom to begin his tour of duty in Iraq.

He didn’t look quite like their teacher anymore. Peter Farley stood in front of his fourth-grade class dressed in his Army boots and camouflage gear, beret in hand.

But if there’s any way to explain the war in Iraq to fourth-graders, this was it. For the past week, he’s been telling his students at Hancock Elementary School that he’s headed to a place that he has to point out on a wall map. He is going there to stop violence, to help people rebuild their country.

Yesterday, on his last day of class, it seemed final.

Some students cried; others asked more questions. A few got excited thinking that Farley is a soldier, like when they pointed to the helicopter flying overhead yesterday afternoon and thought of their teacher.

“Cool,” said some students, behind nervous giggles. “Weird,” said others.

Still, most couldn’t believe he was leaving.

“I think this really brings the situation to life, I think this really brings [home] the lesson,” said Farley, a 28-year-old teacher and, for the next year, a specialist in the Army Reserves. “It’s difficult to try and make them understand certain aspects of it.”

Farley can tell them only that he’ll be OK. That they’ll do well on their upcoming MCAS exam if they follow his philosophy of “Effort and Respect.” And not to worry, he’s still their teacher.

For Farley and the staff at the Hancock school, the week has held lessons that school curriculums don’t address. Principal Marcia Andrade Serpa said parents typically decide whether to allow their children to watch the news or to tell them about the war in Iraq.

But among the bitter realities of the war is that it can affect a fourth-grade class, and school officials have been looking for ways to tell students and their parents that their beloved teacher is leaving for the rest of the school year.

“I think we, as adults, understand the reality of being in war, but children, I don’t think they do as much,” Serpa said. “Some may not be grasping it entirely; I mean they’re still children.”

Some reacted in their own way. Terrell Costa, who sits in the front row of the class, and his mother bought Farley his own set of dog tags, one of them inscribed with the words, “The World’s Greatest Teacher.” Ria Monet McKinnon gave him a letter with an “angel stone,” “infused with love, healing energy, and protection.”

“I hope you take it with you,” she said. “I will ask the angels to keep you safe.”

In a class assignment yesterday, the children even offered their teacher some advice, telling him to be brave, be safe, and to remember their times in class.

“Just be yourself,” said Jillian MacDonald, a quiet girl who sits in the front row. “I know your [sic] doing this for you and your family. Even though your not here with me and the class your right here with me. Your in my heart.”

Farley connects easily with his students. He plays games and hangs posters of the New England Patriots alongside lessons in math and vocabulary. Yesterday, the students played kickball in the afternoon to help ease the tension of his last day.

Last year, he followed through on a promise to shave his head in front of the class if the students scored well on the Massachusetts Comprehensive Assessment System exam – they scored the best in the city.

When he tells them the exam is easy, they reply in a chorus: “It’s too easy, Mr. Farley, too easy.”

Farley has been a teacher for five years, but now he is putting his career on hold to go to Iraq, a decision he made after enlisting in the Army Reserves two years ago – an obligation he said he felt after the Sept. 11 terrorist attacks.

Last summer he took time off from work to attend boot camp.

“It was a feeling inside of me that I couldn’t kick, and it was something I needed to do or I would regret for the rest of my life,” he said.

At first, Farley considered himself a teacher with a side job as a soldier. But over the past several months, he realized he could be deployed.

He married his longtime girlfriend, Kim, three weeks ago. Soon afterward he was told he would be deployed for a year.

On Thursday, Farley led the yearly MCAS rally with his fellow teachers and the entire fourth-grade class. He told the children that they’d do well if they have “Effort and Respect,” and yesterday he reiterated the message to the 20 students he has seen every day. Work hard, he told them.

And then he gave them each pencils inscribed with his name, for use in their MCAS exams. He gave them small American flags and a picture of them together, the students wearing their red, white, and blue “Team Farley” sweat shirts.

“You know I’m right there 100 percent behind you,” he told them. “Even if I’m not physically here, I’m still your teacher.”