Over the decades, the stone house and grounds that served as Confederate Gen. Robert E. Lee's headquarters at Gettysburg sprouted a motel, restaurant and other modern structures that dismayed preservationists and Civil War buffs keen on historic authenticity.

Now, after a $6 million restoration that erased decades of development at the 4-acre site, the property looks much as it did in July 1863, when Lee suffered defeat in a bloody three-day battle that turned the tide of the war.

"If Robert E. Lee would ride up tomorrow, he would recognize his headquarters. And for over 100 years that wasn't the case," said James Lighthizer, president of Civil War Trust, the nonprofit that bought the house and grounds from private owners and completed the restoration.

On Friday, more than 600 people are expected at a ribbon-cutting ceremony at the site, which now includes a walking trail and interpretive signage. Plans call for the property to be turned over to the National Park Service.

The area around the circa-1830s house was the scene of heavy fighting on the battle's first day, and its strategic location atop Seminary Ridge made it an ideal spot for Lee's battlefield headquarters.

"He's dictating and writing a lot of orders, he's using that as a base from which to observe the enemy, and he is responding to crises and events as they occur," said Garry Adelman, Civil War Trust's director of history and education.

The longtime occupant, a widow named Mary Thompson, is believed to have remained in the home during the battle, and lived there until her death in 1873.

The home was left out of Gettysburg National Military Park, then gutted by fire in the late 1890s. By 1921, it had become General Lee's Headquarters Museum, a commercial venture that transformed the surrounding property.

"Without question, this was one of the most important unprotected historic buildings in America," Lighthizer said.

Civil War Trust acquired the property in January 2015 after a fundraising effort that included major gifts, grants and smaller donations from more than 11,000 people.

Workers removed dormers that were added to the home in the 1900s, replaced the roof, fixed the interior and demolished all modern buildings, including a Comfort Inn. The land was returned to its 1863 contours, and fencing installed to replicate what was there at the time. An apple orchard — another feature of the Civil War-era landscape — will be planted in the spring.

"It was by far the most complex restorative effort we've ever done, and nothing else is even close," Adelman said.

With nearly all work complete, Gettysburg National Military Park plans to expand its boundaries to include Lee's headquarters.

The park service will use the house for special programming and open it to the public several days a year, including around the battle's anniversary, similar to how it operates Union Gen. George Meade's headquarters.

More on this...

"I think there were a lot of folks who are aficionados of Gettysburg who probably never expected to see Lee's headquarters in such a state of preservation," said Park Superintendent Ed Clark. "Civil War Trust really has worked miracles."

Lighthizer said it was a longtime imperative of the group.

"We're not the oldest democratic republic in the world by accident. We went through a lot of trials and tribulations, and this site marks one of the pivot points in how we remained a democracy, how we remained a unified nation," he said.

"And that story needs to be told."