When a new school year began at the Sierra Sands Unified district 150 miles north of Los Angeles in August, students in four classes were greeted by a substitute.

The small district's human resources department had worked aggressively through the summer to attract new teachers. Staff members made out-of-state recruiting trips, highlighting their area's low cost of living and proximity to Los Angeles. The district revamped its website and asked residents to tap their families and friends for job candidates.

"We were leaving no stone unturned," said Dave Ostash, assistant superintendent of human resources of the 5,000-student district.

Still, when the bell rang on the first day of class, they fell four teachers short.

After years of recession-related layoffs and hiring freezes, school systems in pockets across the United States are in urgent need of more qualified teachers.

Shortages have surfaced in big cities such as Tampa, Florida, and Las Vegas, where billboards calling for new teachers dot the highways, as well as in states such as Georgia, Indiana and North Dakota that have long struggled to compete for education graduates.

"When you are 1,000 teachers short, you have to think about how that affects our children," said Oklahoma's superintendent of public instruction, Joy Hofmeister. The Republican has lobbied state lawmakers to raise salaries and reduce testing in a bid to make the profession more attractive. "We are talking about 25,000 to 30,000 kids without a permanent teacher."

In California, which educates more children than any state, the number of teaching certificates issued has dropped by half in the past decade. The state's school districts estimate they will need 21,000 new teachers annually over the next five years.

"There was a point where we were, frankly, overproducing teachers. Now, if you look at the most recent year, we are not producing enough," said Joshua Speaks, a legislative representative at the California Commission on Teacher Credentialing.

School administrators and academic researchers point to a variety of reasons for the shortages.

During the recession years, many districts shed jobs and those that were hiring had a plenty of applications from laid-off teachers, new graduates and professionals looking for work outside their field. Now as school district budgets recover, they are recruiting from a smaller pool of freshly minted educators, many of whom are considering multiple job offers.

"Two or three years ago, you got 300 applications for every job," said Donna Glassman-Sommer, a public school administrator who runs a new teacher development and hiring program. "Now it's kind of like I've never seen. It's the start of the school year and they have six or 10 openings in a mid-sized school district."

Compounding the problem, she said, veteran teachers are being taken out of the classroom and moved to specialized roles as districts work to put in place changes associated with the Common Core academic standards and a new school funding formula that directs more money to schools with the most disadvantaged students.

Debate over testing, accountability and revamping the nation's lowest performing schools has invariably circled back to teachers.

"People go to higher paying jobs, jobs that are more respected, and employment that doesn't go up and down like a yoyo," said Randi Weingarten, president of American Federation of Teachers.

Elena Avila, 24, a first-time kindergarten teacher at Union Avenue Elementary School in Los Angeles, said she had wanted to be a teacher since an early age, but began to doubt the decision as she got older. She got a degree in classical studies and volunteered before making up her mind.

Now in the Los Angeles Unified School District's intern program, she offers her perception of the opportunities: "If you're prepared to handle anything then you definitely have all your options open."

Nationwide, the number of students training to be teachers has declined from 719,081 in 2010 to 499,800 in 2014, U.S. Education Department data show. Even districts that were able to meet their needs this year are bracing for a projected shortage ahead.

"It is looming," said Deborah Ignani, deputy chief of human resources for the Los Angeles district.

University of Pennsylvania education and sociology professor Richard Ingersoll, an expert on teacher workforce issues, said a failure to retain teachers is a much bigger part of the equation. He said enticing experienced teachers, especially in chronically understaffed subjects such as math, science and special education, to stay in the profession would be a better solution than ramping up enrollment or allowing people who have not been fully trained to teach, as many districts are now doing.

"Yes, there are some hard-to-staff schools and there can be difficulties across states or regions," Ingersoll said. "But it's not due to a shortage of new teaches but too much turnover."

To fill their vacancies, districts are trying everything from college visits to circus-like stunts.

The Las Vegas-based Clark County School District, which has about 780 teaching positions staffed by long-term substitutes, started a campaign by having the superintendent fly on a zip-line over a street in downtown Las Vegas. The Fresno Unified School District in California's San Joaquin Valley has begun advertising openings at movie theaters.

"It's become our mantra: Everyone is a recruiter," said Cyndy Quintana, a human resources administrator in Fresno.

At Sierra Sands Unified, half of the new employees are not fully credentialed; they're working toward alternative certifications while they teach.

It wasn't until three weeks into the school year that all the vacancies were filled. For the four newest teachers, there was no time to prepare, only dive in.

"They're going and hitting the ground running," Ostash said.