When Juan Chavez went to school in Long Prairie, Minn., in 1999, he was one of only four Hispanic students. He found it difficult to feel included.

"It was hard because they don't accept you," he recalled.

Now his 12-year-old son and 5-year-old daughter are students in the same district — and living a completely different experience.

"I think the kids right now, they're involved with other people," he said. "Before, it wasn't that easy."

The little Minnesota town of Long Prairie, an hour north of St. Cloud, is home to about 3,400 people. Most rural communities in the state have seen a population decline over the past two decades, but Long Prairie has grown — mostly because of Hispanic immigrants.

Chavez's family moved from Mexico in 1993. His father worked at one of the meatpacking plants in Long Prairie. Chavez, his mom and five siblings joined him, and have lived in the town ever since. He described Long Prairie as "pretty calm."

"You can go out of your house in the nights and don't worry about somebody going to get you or steal," he said. "It's safe."

Now the family owns a restaurant downtown, Taqueria Chavez. It's been open about six years. "If a Mexican sees the name Taqueria, he knows it will be authentic," Chavez said.

It started out as a little spot with two booths. It has expanded to include more seating. Chavez also owns the building with apartments upstairs.

The restaurant serves authentic Mexican food, like huarache and enchiladas made with corn tortillas. Chavez runs the place, but it was his mom's cooking that made it a reality.

After his father was killed during a trip to Mexico, his mother had a hard time dealing with the loss.

"My mom was really depressed, but she likes to cook a lot," Chavez said. Opening the restaurant, he said, was "doing something for her so she can pay rent. She doesn't have to be in the house all the time thinking of my dad."

Downtown Long Prairie is attracting Hispanic-owned restaurants and grocery stores, and a population that the mayor says is necessary to keep the business district thriving. Riham Feshir | MPR News

Taqueria Chavez is one of two Mexican restaurants in downtown Long Prairie. Next door, there is a Mexican bakery. A Mexican grocery store is a few blocks away.

The businesses illustrate a trend the city has seen over the past decade. Hispanic-owned businesses have replaced boarded-up shops downtown. There, you could find a Hispanic barber and Hispanic-owned apartment buildings. The city recently received a permit application for a new Puerto Rican restaurant that's planning to open downtown.

Mayor Don Rasmussen is proud of the trend, and he talks about it often.

"If we did not have the people in this city that we have today, the immigrants that have come here, we can put a padlock on every door downtown Long Prairie and lock up the houses and say goodbye," he said. "Because there would be nothing left."

Rasmussen has been mayor for 18 years. He moved to Long Prairie in 1968 for a job with delinquent youth at the Department of Corrections in nearby Sauk Centre. Rasmussen grew up in Jackson, just north of the Iowa border. The grade school he attended isn't there anymore. The gas stations and blacksmith shop aren't, either.

And it's not an unusual story.

A 2017 report from the Minnesota State Demographic Center found that the population in rural communities declined since 2000. At the same time, urban areas grew, accounting for 80 percent of Minnesota's population growth overall between 2000 and 2015.

But Long Prairie's story has played out differently. Over the past 20 years, jobs in the meatpacking plants have attracted a large number of Hispanic immigrants to town. In 2000, Hispanics and Latinos made up 9 percent of the city's population. That jumped to 32 percent in 2016, according to the most recent census data available.

One of the meatpacking plants is Dan's Prize, which is owned by Hormel. The company says it's committed to a diverse, multicultural team of employees. One of the people driving that commitment is Jeff Tobak, president of Dan's Prize.

"We have the highest respect for our diverse, multicultural team of employees, who passionately produce some of the most beloved brands for an equally diverse group of consumers," said a company statement attributed to Tobak. "Our company respects all cultures and values and appreciates diversity in our workplace. People like to work where they are appreciated and respected, two core values important to our company."

Another meatpacker, Long Prairie Packing, offers job applications in English and Spanish.

A city with demographics similar to Long Prairie's is Worthington, which has attracted attention for its growth in recent years as well. Now Long Prairie is starting to get the same kind of publicity, something that bothers Melissa Kolstad. She's lived there since 1979, and owned a clothing shop downtown for five years. She doesn't agree that the city and the business district are thriving.

"When I was a kid, our entire downtown was full of stores. Full. Completely," she said. "There was not an empty building on Main Street. Now it's primarily empty buildings, with a few businesses sprinkled in."

Kolstad said many longtime business owners tried to keep their doors open, but lacked support from city and business leaders. She said those leaders focused their energy on big businesses like Walmart and Coborn's.

"I feel like it was almost detrimental to the local business owners and nonimmigrant business owners," she said, despite "the hard work and the dedication that they have had all the years they've fought to keep the doors open in Long Prairie."

At the same time, however, Kolstad agreed that without the immigrant population and young people moving into town, the school system would've suffered.

Enrollment at the Long Prairie Grey Eagle school district dropped by almost a third over a nine-year period. The district saw budget cuts and layoffs as a result. Now, Superintendent Jon Kringen says, it's back up to about 900 students. The kindergarten class is 55 percent Hispanic.

"The influx of immigrant students has certainly benefited the schools because we basically refilled many of the classrooms and provided additional funding for the school district and we are much better off than we were," he said.

To cope with the new realities, teachers are learning Spanish to try to communicate better with the students.