The Prince William School Board approved a controversial aquatics facility as part of a $97.9 million high school construction deal Wednesday night, bringing an end to a lengthy debate about whether the school system could afford to spring for a school with a pool.

In the end, the board voted 5 to 3 in favor of the pool, which is expected to cost $8.4 million to build.

“I have agonized for days, and I have listed advantages and disadvantages,” said board member Betty D. Covington (Potomac), who was considered by many to be a swing vote in the long-running debate.

“If we build football fields, lacrosse, soccer, baseball fields, track for students who run track. Why do we not have a pool, at least one pool, for students in Prince William County to swim?”

Covington and others who supported the pool said it was an equity issue to expand access to the sport, and that investing in a pool represented a commitment to future generations of county residents.

Several swimmers wearing warm-up jackets talked to the board about the need for extra swim lanes in the county. The facility will be used by swim teams, students, and community members, as well as robotics teams for underwater competitions.

The 2,050-student school, scheduled to open in 2016, is expected to relieve overcrowding at three other high schools in the fast growing county. Its design is based on Patriot High School in Nokesville, but it will have an expanded auditorium, a black box theater and other features for a visual and performing arts specialty program.

The amenities, and the pool in particular, have become a symbol of frivolous spending to some community residents, who argue that the district should prioritize spending on other issues. The county has the highest class sizes in the state and lags neighboring districts in teacher pay.

Board members Gilbert A. Trenum, Jr. (Brentsville), Alyson A. Satterwhite (Gainesville), and Lisa E. Bell (Neabsco) voted against the high school plans, arguing that pool construction should be the responsibility of the county’s parks and recreation department.

Trenum proposed delaying the vote until January after the board has a broader discussion about school construction plans.

“Nobody is asking that we build square boxes or schools that look like prisons, but we are building schools for our students....We’re not building temples to the gods of education,” he said.