In January 1777, George Washington’s troops took a group of British soldiers by surprise near Princeton, New Jersey, scoring a key victory and bolstering America’s morale. But for years, part of that battlefield has been threatened by a potential housing project. No longer: As the Associated Press reports, a group of historical preservationists just struck a deal that will preserve the entire battlefield for future generations.

A group of historical organizations will now buy the threatened land from the Institute of Advanced Study, then gift it to the adjacent Princeton Battlefield State Park, writes the AP. The nearly 15-acre tract, which includes a key portion of the battlefield known as Maxwell’s Field, was previously slated to be used for faculty housing at the research institution. Now, the purchase will allow the Institute to build faculty housing elsewhere and protect most of the battlefield land, too.

A coalition of historical preservation organizations including the Civil War Trust and the National Trust for Historic Preservation were part of the agreement. They’ll buy two thirds of the land—pending city permits—and another tract north of the battlefield and give it to the Princeton Battlefield State Park with the hopes of helping interpret the battle.

And what a battle: at the start of the war, the scrappy patriots seemed like they were engaged in a foolhardy campaign against the better funded, more powerful British. But late in 1776, Washington began a series of gutsy advances. First, he crossed the half-frozen Delaware River, a somewhat disastrous move that nonetheless heightened the hope of his troops. Then, his troops besieged a force of nearly 1,000 Hessians mercenaries in Trenton, capturing over half of the troops. After another skirmish, though, it looked like Washington and his men were trapped.

But Washington wouldn’t go down without a fight. He sent his troops toward nearby Princeton under cover of night, but left 500 men behind to make the British believe that they weren’t on the move. They met up with the rear guard of the British forces, who weren’t prepared for an attack.

This time, the often outnumbered rebels had the advantage—there were five patriots to every one redcoat. Though they were surprised, the British put up a fierce resistance, prompting Washington to ride around shouting “Parade with us, my brave fellows. There is but a handful of the enemy, and we will have them directly!” The charge that won the battle took place at Maxwell’s Field—the place that will now be preserved.

Washington’s daring move in Princeton raised the morale of his struggling troops and helped win the war. Similarly, news of the agreement is heartening preservationists eager to protect swaths of historic land before it’s too late. “We have worked for decades to ensure that the Princeton Battlefield and the men who fought on this land 240 years ago are appropriately commemorated,” Jerry Hurwitz, president of the Princeton Battlefield Society, which participated in the negotiations, said in a release. “This agreement honors that commitment and guarantees that an historically significant part of the battlefield is preserved forever.”