After four months of public hearings, an air district hearing board passed a sweeping directive Thursday aimed to block the stink from Sunshine Canyon Landfill from spreading into nearby neighborhoods.

An independent hearing board for the South Coast Air Quality Management District voted 5-0 to pass a so-called stipulated order of abatement designed to kill the stench at Los Angeles County’s largest dump. The law panel ruling followed thousands of San Fernando Valley community complaints.

“We basically just won what we wanted, with the one exception of a tonnage reduction,” said Stephen Beck, secretary and chief financial officer for the Legends at Cascades Community Association in Sylmar, and a plaintiff in a class-action lawsuit against the landfill operator, in an email. “But we got what we wanted.

The nuisance abatement order agreed upon by the air district and landfill owner Republic Services limits major trash drop-offs from 6 to 9 a.m. to control trash odors, while directing the landfill to divert tons of organic food waste and create better trash cover to control garbage gas. It was the second such order by air regulators in the past five years.

• RELATED STORY: Possible solution to Sunshine Canyon stench is in the works

A petition filed last summer by the air district called for daily trash intake at Sunshine Canyon be cut by 3,000 tons – about a third of its daily waste stream.

But the Arizona-based Republic Services, which has spent $27 million to control gas and odors at the 362-acre Sylmar landfill, said diverting the trash to distant landfills could tie up traffic and cause air pollution.

Residents and school administrators in Granada Hills and Sylmar complained about being shut in their homes and classrooms by foul odors they say contributed to headaches, nosebleeds and breathing problems.

The agreement reached Thursday came after 17 public hearings between the San Fernando Valley and Diamond Bar that included testimony from numerous landfill experts, during which dozens of residents pleaded with regulators to stop the stench.

The mutual agreement hammered out between regulators and landfill lawyers now calls for as much as 350 tons a day of organic food waste – said to be the chief cause of methane gas – to be diverted from the landfill by 2018.

It also delays large Los Angeles trash deliveries, known as transfer trailers, until 9 a.m., while allowing the delivery of trash from local routes.

An air district spokesman said it amounts to 80 percent of its original proposal for delaying deliveries.

“We are very pleased that the independent SCAQMD Hearing Board, after hearing many days of testimony from dozens of residents, has adopted an administrative order placing strict requirements on the operation of the Sunshine Canyon landfill,” said AQMD spokesman Sam Atwood.

“We believe these requirements will significantly reduce the foul odors that have plagued the community and nearby school for years.”