Barbed wire and a no trespassing sign tell people to stay away from the George F. Johnson Elementary School in Pike County, Ky. on Aug. 8. The school district closed the school last year because of declining enrollment. The district merged it with two other schools to create a new school that runs from kindergarten to eighth grade.

Pikeville, Ky. — When it opened in 1990 amid boom times deep in eastern Kentucky coal country, Shelby Valley High School had nearly 1,000 students, with enough demand that it built an addition the next year. Now the mines are closing, and the school big enough for 1,200 students sits at half capacity.

When the families leave, Principal Greg Napier asks them why. "Gotta have a job," they say.

Kentucky's public school system added more than 30,000 students over the past decade, growing by 4.8 percent while the national student population grew by 2.5 percent. Yet Eastern Kentucky's schools have lost more than 12,000 students since the 1999-2000 school year, a 9 percent drop that state officials attribute directly to the area's economic struggles amid the declining the coal industry.

It's bad next door in the southern coalfields of West Virginia, too. The state has lost 26 percent of its public school student population since 1979 with declines in 42 of the state's 55 counties. Since 2001, that decline has slowed to less than 1 percent, a figure that would be much higher if not for the explosive growth in the Washington, D.C., bedroom communities.

Some districts have combined or closed low-enrollment schools, forcing families that stay put to send their kids on longer bus rides on mountain highways to the next-closest classroom. Chain-link fences now surround empty schools that had served as gathering places in some small communities, hosting potlucks, pancake breakfasts and even doubling as support centers during mining disasters.

And in Kentucky, at least, the districts being left behind have to grapple with less money because the state — like many— pays for public education in part based on an average of how many students attend district schools each day.

It all adds to the burden in a region already struggling with poverty and a depressed job market.

More than 10,000 people have left eastern Kentucky since 2010, according to estimates from the Kentucky State Data Center.

"Funding is an issue all across the state, but when you are losing students, it totally exacerbates the problem," said Stu Silberman, executive director of the Prichard Committee, a group seeking to make Kentucky one of the top 20 states in reading scores, teacher salaries and other education categories.

Kentucky lawmakers and two independent groups are reviewing the state's 25-year-old formula for funding education, partly to see how to ease the impact it has on dwindling districts. Democratic Gov. Steve Beshear said he would wait for those studies to finish before he considers any changes to the current funding formula.

In the meantime, Napier has converted many of his empty classrooms into other uses, including an indoor air rifle range and storage for the ROTC. One is now an office for a teacher who works with students who are homebound or in the hospital. Others are computer labs. But at least two still sit vacant.

No district has lost more students in Kentucky than Pike County, which has seen its enrollment decline by more than 1,000 students since 2001. The district's enrollment has been cut in half since 1955, dipping below 9,000 for the first time last year. When the district's adjusted average daily attendance fell by 270 students from 2013 to 2014, it lost $1.1 million from its base state funding.

Silberman said it makes sense that if a district has fewer students, it should have fewer expenses. But that only works if the students leave in groups of 25 at a time in the same grade level and at the same school. Pike County Superintendent David Lester said, from a budget standpoint, about 25 students equal one teacher. But officials can't lay off a teacher every time they lose 25 students because they need teachers to teach the students they have. Because students leave scattered throughout the district, that makes it difficult to cut teachers without combining grade levels.

David Lester has avoided that by combining schools instead. Last school year, the district closed three schools - two elementary schools and a middle school - and merged them into a new school that now runs from kindergarten through eighth grade. And the district closed Majestic Elementary School this year after its enrollment dipped below 100 students - a community hub that had been open for 45 years.

"It's just very difficult emotionally to have a school (close) that is sort of the center of a community, particularly a small, rural community," Superintendent David Lester said. "The school seems to be a focal point for them and when they lose it, it's not an easy thing."

In West Virginia, school consolidations have been common over the past two decades, especially in the southern part of the state. McDowell County schools Superintendent Nelson K. Spencer tied any hope of reversing the trend to producing more jobs in the area, saying that starts with building better roads — the county lacks a four-lane highway — and constructing affordable quality housing.

"There's been minimal growth as far as economic development in McDowell," Spencer said. "Coal is still one of the things that we're relying on. From talking to citizens who work in the mines, it's not boding well right now."

West Virginia Department of Education guidelines limit one-way bus runs to 30 minutes for elementary students, 45 for middle and an hour for high school students, and rides that long are common, especially in the southern part of the state.

Mona Laxton, of Lashmeet, a tiny spot tucked about 12 miles off Interstate 77, awakens her three children, ages 11, 14 and 16, at 5 a.m. They get picked up by the bus at 6:25 a.m. for the 35-minute ride to PikeView middle and high schools.

In the mornings, the bus goes up the mountain past their house to the first stop further up the road, then comes back down to their stop. It makes for a long day — one of the Laxton children plays football and on some nights doesn't get home until after 9 p.m. "He's exhausted," Laxton said.

Except for moving, there's not a lot that can been done.

"You just deal with it," Laxton said. "And it's not so bad when it's warm. But when it's cold and the kids are all standing out at the bus stops, that's the hard part."