The Maryland Court of Special Appeals has ruled that Johns Hopkins University is free to develop the former Belward Farm in Gaithersburg as part of Montgomery County’s planned “science city,” despite the wishes of the retired teacher who sold the land that it become a bucolic satellite campus.

The family of Elizabeth Beall Banks filed suit in 2011, charging that she sold the 138-acre dairy farm to Hopkins in 1989 for $5 million — far below its market value — with the understanding that the university would protect it from the encroaching commercial development she disdained.

Banks, who died in 2005, envisioned a small campus with extensive green and open space. But the family alleged that Hopkins influenced the county to rezone the land to allow much more extensive construction. By 2011, plans had morphed into a development with buildings as tall as 12 stories. School and county officials envisioned the site as part of the Great Seneca Science Corridor along Interstate 270, a future home for medical and biotech companies.

A three-judge panel, upholding a circuit court ruling, said Thursday that language in Banks’s agreement with Hopkins did not limit the scale or density of future development. The accord, which specified that the land be used for “agricultural, academic, research and development, delivery of health and medical care and services, or related purposes only,” allowed Hopkins to proceed.

“Although the Family may now regret that Ms. Banks and her siblings conveyed the Farm to Hopkins, or at least that they did not negotiate different terms, we agree with the circuit court that the operative contract frames Hopkins’s development right solely and unambiguously in terms of permissible uses,” the court said. “Unlike hindsight, foresight is not 20/20, and whether anyone specifically envisioned the proposed development, the contract permits it.”

Tim Newell, Banks’s nephew, said he will take the case to the Maryland Court of Appeals, the state’s highest court.

“We were surprised and, of course, disappointed,” Newell said. He said the case is not about real estate but the misuse of a generous gift from a woman of modest means to one of the country’s wealthiest universities.

Newell said Banks would never have sold the land to the school at such a bargain price if she knew how they planned to use it.

In a statement, Hopkins spokesman Dennis O’Shea said: “Johns Hopkins is gratified by the ruling of the court. The university remains steadfast in its determination to develop the Belward Research Campus for the benefit of Montgomery County and in full compliance with its obligations under its agreement with Elizabeth Banks and her siblings. We are grateful to them, as we have always been.”