Pursuit, a nonprofit job-training program in Queens, was in trouble.

After months of back and forth, the New York State Department of Education sent the nonprofit a sharply worded letter last year warning that it would be hit with a cease-and-desist order, and possibly criminal prosecution, unless it quickly overhauled its program to conform to the agency’s school requirements.

“It was scary,” recalled Jukay Hsu, Pursuit’s co-founder and chief executive. “It felt like staring into the abyss.”

While small, Pursuit has a track record of success, helping to lift low-income workers into good-paying jobs as software engineers. Experts say it is at the forefront of emerging trends in upward mobility programs for low-income Americans.

But Pursuit’s innovation was nearly its undoing. Its model of coursework, mentorship and financing does not look like a traditional school. Its technical instruction is constantly updated to meet employers’ needs and tailored to individual learners. And Pursuit teaches “soft skills” like communication, teamwork and resilience.

At the time, Pursuit was seeking approval from the state’s Department of Labor to become a certified apprenticeship program for software development. It aimed to be another path to opportunity for its students, whom it calls fellows.

After discussions between the two agencies, the Department of Education agreed to step aside, said Betty A. Rosa, the state education commissioner. The Department of Labor took a more flexible stance, not requiring fixed courses and tuition payments of the traditional school model.