WATERVILLE — A steam locomotive that has been rusting on College Avenue for more than 60 years will have a new home soon after a Winterport company completes its purchase from the city at a ceremony scheduled for Thursday.

Engine 470 is the largest remaining steam locomotive in New England and the last locomotive to operate on the Maine Central Railroad, according to a news release from New England Steam Corp., the company making the purchase. The locomotive, which has sustained significant damage from exposure, rust and vandals, will be restored and displayed to the public in Ellsworth.

The company will present the city of Waterville with a check for $25,000 during the ceremony, planned for 10 a.m. Thursday at the engine on College Avenue, just north of the railroad overpass.

“The locomotive is a historic icon from another era, before airlines and interstate highways,” Steam Corp. president Richard Glueck said in the news release. He said the locomotive has been deteriorating for years, “and someone with the knowledge had to intervene and preserve it.”

In the next year, the locomotive and tender will be disassembled and moved by truck to Washington Junction in Ellsworth, where the Downeast Scenic Railroad is located. The locomotive, constructed in 1924, will be sheltered for the first time since it was retired in 1954. Restoration of the engine is expected to take several years to complete.

The locomotive will be a “living classroom of literature, history, science and the arts” for students of all ages and a “huge draw for heritage tourism in an ideal setting,” Glueck said.

Waterville started looking three years ago for someone who could buy and restore the historic locomotive. Railroad enthusiasts led an effort to preserve the engine in 2004, but despite enthusiasm for the project, it never came together.

The engine was exposed to decades of harsh weather and vandalism. Waterville City Manager Michael Roy has estimated previously it would cost up to $1 million to restore it.

In 2012, city officials put out a request for proposals to buy or restore the engine and in 2013 approved the sale to New England Steam Corp.

Locomotive 470 was the last steam engine used for Maine Central Railroad passenger service. It made its last trip to Waterville from Portland and Bangor in 1954. In 1962, it was given to the city as a gift by Maine Central to celebrate its 100th anniversary.