A love of history was instilled in Jim Gregory at an early age by his family, which led him to pursue it as his major in college and then spending 30 years teaching it in Central Coast high schools.

So it’s not surprising the seeds of a book he just published on a turbulent period in Arroyo Grande history were planted some 20 years ago.

“It was in gestation a long time ago,” Gregory said recently over a cup of coffee in the back of Café Andreini. “The real work took about a year. Some of the stories I found six or seven years ago. But the two boys who died on the Arizona I learned about 20 years ago.”

Gregory just published “World War II Arroyo Grande,” a 160-page look at the lives of the city’s residents that includes chapters on the early pioneers and later immigrants, setting the stage for the conflicts that not only fractured parts of the community but also pulled portions of it together as the war raged on two fronts.

The stories are intimate, much of them related to Gregory directly by family members, and the bond he feels with them is evident when he talks about them. He also relied on a collection of oral histories of Japanese Americans at Cal Poly.

However, most of his research was done online — “Google is my friend,” he said — but even the tales told by the seemingly cold statistics of official reports, census records and newspaper articles had an impact on him.

Gregory recalled the “wonderful letter” he came across written by a GI overseas to his family back here at home.

“It was charming, full of humor,” he said. “Some time later in my research I found a story where he was killed in action. It was like getting hit in the stomach.”

In addition to the love of history instilled by his father — “he was such a great storyteller” — and mother — “she was of Irish heritage and instilled in me a real sense of what’s right and wrong” — Gregory’s look at local history was influenced by his childhood.

“The book is conditioned by growing up here and how fortunate I was to grow up here,” he said.

Gregory, 64, moved to the Arroyo Grande area from Taft when he was a baby and grew up in the upper valley on Huasna Road. He attended the two-room Branch School — later it had four rooms — and graduated from Arroyo Grande High School in 1970.

He attended Cuesta College, the University of Missouri at Columbia and Cal Poly, then taught mostly history for 11 years at Mission College Prep in San Luis Obispo and 19 years at AGHS before retiring last year.

It was while teaching that Gregory’s online historical research really began.

“It became a lesson plan when I taught at Arroyo Grande High School,” he said, explaining that his goal was to show the students what a wealth of information is available on the Internet.

“How do you uncover the life of someone who was not famous and left no record?” was the question he posed to students. “What can you find using the Internet? It was really gratifying that these kids became historians themselves.”

Sign up to receive headlines in your inbox!

Breaking News | Local Sports | Daily Headlines | Local Obituaries | Weather | Local Offers

As Gregory delved into the war era in Arroyo Grande, the story that unfolded found a focus on the Japanese Americans and their internment and the Filipinos who were treated as second-class citizens.

“It turned out to be very much a story of immigrants,” he said.

Looking at an AGHS yearbook from 1942, he found that of the 58 seniors, 25 were Japanese Americans.

“That’s 43 percent,” he said. “That astounded me. But I didn’t recognize a lot of the surnames. That’s because 50 percent of them did not come back (from the internment camps). Some settled in the Midwest, some in Colorado.

“It’s almost like we shot ourselves in the foot,” he said of the Japanese internment. “We got rid of people who were examples of the best of American ideals. They were hard-working, they saved their money.”

The discrimination he found against the Japanese Americans both during and after the war was tempered by how some Arroyo Grande citizens cared for their farmland and belongings while they were gone and stood up for them when they returned, helping them reintegrate into local society.

Gregory also found how servicemen — and women — from Arroyo Grande crossed paths with major figures from that era.

Like the female Marine who ended up being the driver for President Roosevelt.

Or the young officer who was sent to China to help resistance fighters and danced with the woman who would later be tried, convicted and sentenced to death for helping the “Gang of Four” organize the 1968 Cultural Revolution.

“People from this little town have connections to these great people from the 20th century,” Gregory said.

He found tales of valor on the battlefield and medal winners as well as stories of tragedy and loss.

“There is some inspirational stuff,” Gregory said. “There were a lot of heroic acts by local people.

Underlying it all, he found a strength, resilience and courage among not only those who fought but also those who waited at home.

“There is an incredible sense of community spirit and generosity,” he said. “This book is intended to be a thank-you to them.”

Although the book took a tremendous amount of work, Gregory isn’t sitting on his laurels. He now plans to start working on a book about the area in the 1930s.