Charter school advocates in the Los Angeles Unified School District (LAUSD) won a major victory Tuesday as two of their candidates won seats on the school board, giving them the majority.

Steve Zimmer, president of the LAUSD – the nation’s second-largest school district – lost in District 4 to teacher and attorney Nick Melvoin. Kelly Gonez also won a tight race in District 6 over Imelda Padilla, who was backed by the teachers’ unions.

Gonez and Melvoin will join incumbents Monica Garcia and Ref Rodriguez, creating the first-ever four-member majority of charter-school supporters on the board, reports the CBS local affiliate.

The school board races involved millions of dollars in campaign spending, the Los Angeles Times reports, with the candidates expressing frustration at times over the amount of outside spending from charter school advocate groups and unions making an impact on the campaigns.

According to the Times report:

Outside groups funded by charter advocates painted Zimmer as a charter school foe. Anti-Zimmer mailers characterized him as a gun-happy militant, a protector of pedophiles and the mastermind of the school district’s iPads-for-all debacle. Groups bankrolled by public employee unions tried to link Melvoin, 31, to Secretary of Education Betsy DeVos and President Trump, both of whom are extremely unpopular in Los Angeles. Neither of these portrayals were accurate. Zimmer has voted many times to approve new charter schools and Melvoin is a Democrat who has been critical of the Trump administration’s education policies.

The unions reportedly spent some $2.5 million on Zimmer’s campaign and more than $2.34 million on that of Padilla. Charter school promoters spent upward of $5.69 million on Melvoin’s campaign and $3.3 million on that of Gonez.

Charter school advocate Netflix chief executive Reed Hastings – a Democrat – donated $5 million to California Charter Schools Association Advocates, which managed much of the spending for the charter candidates.

LAUSD has the highest number of charter schools and charter students of any other school district, though charters still only represent 16 percent of enrollment.