Costco's eight-year-long effort to build a mega gas station in Wheaton has been blocked by a ruling from the Maryland Court of Special Appeals.

WASHINGTON — Costco’s eight-year-long effort to build a mega gas station in Wheaton has been blocked by a ruling from the Maryland Court of Special Appeals.

The retail giant had appealed previous denials to build the 16-pump gas station at the Westfield Wheaton Mall in Montgomery County, Maryland.

Maryland’s second-highest court ruled April 11 there would be a risk of the gas station causing adverse health effects to members of the community.

Costco’s planned location for the gas station was about within a few hundred feet from a neighborhood of single family homes, a community swimming pool and tennis club and the Stephen Knolls School for children with developmental disabilities.

The court’s ruling comes after 15 months of deliberation and follows a yearslong legal battle.

In December 2010, Costco applied for the special exemption permit to construct the gas station. It filed a second permit in November 2012, for a different location, after withdrawing the first one.

“This decision upholds the power and duty of county zoning officials to protect the health of county residents against environmental pollution,” said Larry J. Silverman, a member of the “Stop Costco Gas Coalition,” in a statement.

Montgomery County Council President Hans Reimer said the council thought the Costco gas station “was not a really good use of that location and would be very damaging to the surrounding communities.”

Danila Sheveiko, past president of the Kensington Heights Civic Association, said concerned neighbors led the fight against Costco’s plan, noting that residents were involved in the numerous hearings over a period of eight years.

“I’m so proud to live in a community that went toe-to-toe with these billionaire bullies,” said Sheveiko, referring to retail giant Costco. “We defeated them every step of the way.”

WTOP has reached out to Costco for comment. Costco has “mega” gas stations—with as many as 16 pumps—in other counties in the region, including Frederick and Howard Counties.

WTOP’s Kate Ryan contributed to this report.