A Chicago pipeline in operation since before the Civil War was honored and excavated as the last of its kind on Friday morning.

The cast-iron gas pipeline had been running from 1859 until just a week ago, when the last customer using it finally switched to a modern natural gas main.

A small working crew extracted the 17-foot-long pipe from a large hole and placed it on a flatbed truck at Hubbard and Orleans streets in River North, in what the city's cultural historian, Tim Samuelson, called a historical occasion, according to the Chicago Tribune.

CHICAGO POLICE OFFERING $10,000 REWARD FOR INFORMATION ON SUSPECT WHO SHOT OFFICER

“It’s a tremendously big deal to see this amazing bit of history come out of the ground," Samuelson said.

Back in the 1800s when Chicago had under 112,000 people, the pipeline helped keep residents safe against crime at night by giving the city reliable light.

“Drawing from these pipes you could have a fixture in your house that would give reliable, brilliant light," Samuelson said. “Dark streets could now have a gas streetlight that would brightly make the street a safe place to walk.”

The excavation was part of the System Modernization Program, created by Peoples Gas in 2011 with the goal of replacing over 2,000 miles of natural gas pipeline in Chicago.

Andy Hesselbach, Peoples Gas vice president of construction, says the new pipelines will be less prone to leaks and this specific one had experienced 30 leaks in the past 30 years.

ERIC TRUMP SAYS CHICAGO RESTAURANT EMPLOYEE SPIT ON HIM: REPORT

“We’ve had a cast-iron system since the 1800s, and over time it has been replaced as we’ve upgraded," Hesselbach told the Chicago Tribune. “Higher pressures require smaller pipe, and (newer pipes) also have certain safety benefits.”

Days prior to the extraction, workers dug a hole around the pipe, surrounded it in wood and placed bags and stoppers to prevent the flow of gas during the process.

The pipe may be out of the streets, but a portion of it will live on. It's scheduled to be on display at the Peoples Gas training center, while another will be donated to the Chicago History Museum, according to the Chicago Tribune.

CLICK HERE TO GET THE FOX NEWS APP

“It’s a gas pipe, but to see the real thing when this was in an era of dirt streets and horse-drawn wagons that evolved into building up things like the Merchandise Mart, and this pipe never went anywhere. Not only was it sitting there, it was supplying the gas to all of these places throughout history,” Samuelson told the Chicago Tribune. "Seeing it come out of the ground, it’s not my usual day at the office.”