Parents and students gathered in the Westbury High School auditorium erupted into applause Thursday when Superintendent Eudes Budhai announced the district had been granted permission to lease space at Nassau Community College — averting an overcrowding crisis just days before the first day of school.

“They are going to approve a one-year lease to Nassau Community College annex,” Budhai told a crowd of 260 to 300 people, who previously were told the plan voters approved months ago had been rejected by state officials.

Voters had approved a plan to rent space from NCC for nearly 400 ninth-graders even as the high school — built in 1958 for 1,100 students — was set to accommodate about 1,600 students, school board president Pless M. Dickerson said before the 6:30 p.m. meeting.

State Education Department officials rejected the plan earlier this month, causing Westbury administrators to scramble for alternative spaces.

After that rejection, the district appealed to state Education Commissioner MaryEllen Elia, Dickerson said earlier Thursday.

“I am honored to have played a role in Commissioner Elia listening and realizing this is a district that needed their help,” said state Sen. Elaine Phillips (R-Flower Hill), who communicated school officials’ concerns to Albany, at the Thursday night meeting. “And the state was there for them.”

advertisement | advertise on newsday

In a letter late Thursday, the state Department of Education told Westbury school officials it had granted the district a one-time temporary lease for one school year for the ninth grade, Dickerson said.

The district must make adjustments to the NCC building before school starts Sept. 1. The annex is 3 1⁄2 miles from the high school and about 2 miles from the district border.

Dickerson said he was “elated.”

“I just got a call to say they are going to give us permission to use it for a year, which is excellent,” he said. “We are elated and it is going to give us the opportunity to provide the smaller community learning for the ninth-graders.”

The district had planned to bus ninth-graders to NCC’s North Annex, on the college’s Garden City campus, Dickerson said earlier Thursday. Last week, he said, the state Education Department told the district it could not do this.

“The district applied to the state for the OK. We were told ‘No’ because of a statute that says you cannot lease a building in another district unless it is owned by the school district,” Dickerson said. “But another statute says the board in an emergency has the authority and the obligation to lease space.”

The district posted an alert on its website for “urgent meetings” for parents on Thursday at 6:30 p.m. and Friday from 7 a.m. to 3 p.m. The meetings would be held in the high school’s Little Theatre.

Westbury is among five of Long Island’s 124 public systems that will begin the 2017-18 school year next week. The district’s projected enrollment is 5,479, according to the most recent figures from the Education Department.

The incoming ninth-grade class has about 370 students, while the senior class that just graduated had 287, Dickerson said. Seventy-five additional high school students also registered over the summer.

The district has struggled for years with surging demand, much of it from a growing immigrant community, officials have said. Enrollment districtwide rose nearly 30 percent from 2006 to 2016 — from 3,830 to 4,934 students, according to state figures.

advertisement | advertise on newsday

State education officials said in Thursday’s letter that they had recently received additional data on enrollment and school space from the district and Nassau BOCES that further demonstrated overcrowding.

In 2015, the school board proposed a $172.6 million bond resolution to pay for massive upgrading of district facilities. Facing strong criticism, trustees canceled the vote three weeks after scheduling it.