LEWISTON — Mike McGraw, the Lewiston High School boys soccer coach whose team captured three Class A state championships in the last five years, is retiring after 37 seasons.

McGraw’s first state title with the Blue Devils in 2015 was a source of pride for a city that had undergone a dramatic change with the arrival of thousands of immigrants from African nations.

That team’s rise was chronicled in Amy Bass’ book, “One Goal: A Coach, a Team, and the Game That Brought a Divided Town Together.”

“That was extremely special,” McGraw told the Lewiston Sun Journal. “To get some of these players from other countries, that changed the game and I had to change myself to become better at my job for them. That’s been so rewarding, getting to know them.

“But kids are kids. It doesn’t matter who they are or where they are from because they’re still kids, and it was such an interesting evolution.”

McGraw’s teams also won Class A state championships in 2017 and 2018.

McGraw said he realized it was time to retire when his mind didn’t immediately turn to next season after Lewiston fell to Falmouth 5-2 in this year’s state final.

“Unless I’m 100 percent invested into it, I don’t feel that it’s the right thing to do,” McGraw told the Sun Journal. “I’m not going to short-change my kids, I’m not going to short-change my school. I think it’s only fair if I can’t go 100 percent, I should drop back.”

McGraw told his players of his decision Monday.

McGraw, a Lewiston High School graduate, played soccer at the University of Southern Maine before returning home where he served as an assistant coach at Lewiston for six seasons until becoming the Blue Devils’ head coach in 1983.

McGraw previously retired from a 42-year teaching career at Lewiston High School last year.