THE STEAM TRAIN ruled America's railways for 120 years, weaving a tapestry of legend and folklore at every junction and whistle stop. It is no surprise that even today a long, lonely whistle blast in the distance is enough to fire up an inexplicable longing to go somewhere -- anywhere.

Norfolk Southern's Class A Number 1218 was the last operating commercial steam engine in the United States when it was retired in 1959. For a few years the 16-foot-high giant generated emergency power for Union Carbide in West Virginia, and also sat in several museums. Now the 1218 is back in service as part of Norfolk Southern's steam train excursion program, traveling around the eastern United States taking train lovers on day-long trips.

During the last three years local excursions leaving from Old Town Alexandria and sponsored by the National Historical Railway Society's (NHRS) Potomac and Washington chapters and the Chesapeake division of Railroad Enthusiasts Inc., have drawn an increasing number of railway fans who long to smell the pungent odor of soot and steam bellowing out of the 1218's stacks. Yet, according to Henry Bielstein, president of the NHRS's Washington chapter, scheduled development of Alexandria's rail yards is likely to end these trips after the 1990 season. The three final trips are scheduled for the weeks ahead.

To Bielstein, the 1218 is more than a mechanical symphony of rods, pipes and valves. "To a lot of us, a steam engine is alive," he says. "You see steam popping out. You hear the air compressors pumping away. You see the piston rods and main rods on the wheels flashing up and down, turning the driving wheel. It acts like a live piece of machinery."

The diesel engines that have replaced steam engines, says Bielstein, are "just big boxes that make a roar."

If you want to catch a ride behind this myth-maker, then show up at Amtrak's Old Town Alexandria Station Sept. 30 for the 1218's pilgrimage to Front Royal, Va. (The other two excursions include a trip to Lynchburg, Va., on Oct. 6 and another trip to Front Royal, on Oct. 7.) You won't be disappointed.

The 76.2-mile, 12-hour round trip to Front Royal follows the historic Orange and Alexandria Railroad and Manassas Gap Railroad lines. The 1218 chugs first through Springfield and then across a trestle high above Lake Accotink near Fort Belvoir. It passes through quaint Clifton, crosses the historic Bull Run trestle, and spans picturesque Manassas Gap Bridge. The bridge is a favorite photography backdrop for serious train enthusiasts called "railfanners." Expect a few dozen of these rail fans at nearly every decent photo opportunity along the way.

After leaving Manassas, a little imagination easily transports you back 50 years as the train steams through the countryside. Virginia towns such as Graham, Wellington, Gainesville, Haymarket, Thoroughfare, The Plains and Marshall appear as haunting as black and white photographs through the rectangular windows of the vintage 1940s and '50s rail cars. If you want appropriate smells to go along with your fantasy, request an open car. Air-conditioned cars are also available if a little soot in your face is not appealing.

By the time you pass through Rectortown, Delaplane and Markham, Va., at mileposts (MP) 29.9, 33.8, and 38.1, it is easy to imagine farmers and other country folk on the porches of clapboard houses, which are set back only a few feet from the train's right-of-way.

The picturesque climb up Linden Hill at MP 42.9 gives the 1218 a chance to flex its steam muscles. Despite its power, the mighty engine will still take its time to crest the hill. Sit back and enjoy the view across the rolling countryside as the train begins its steep 400-foot descent into the Shenandoah Valley. Front Royal's wood frame, tile-roofed station is just around the bend.

The Sept. 30 trip makes brief stops for photographers along the way, so plan to bring your camera. You'll only have an hour and a half in Front Royal before the train begins its return trip at 2:30 p.m. Packing your lunch or dining in the buffet car ensures you won't miss the return train.

BUILDING UP STEAM -- The "Photographer's Limited" excursion leaves the Alexandria Amtrak Station, 110 Callahan Dr., Sept. 30 at 7:30 a.m. Boarding in Manassas at 8:15 a.m. is also available. Coach tickets are $48 for adults, $40 for children; seating in a luxury parlor car is $110 per person, including meals. First-class seats are in a 1923 restored Pullman and are $135, including meals. Tickets are available at Arlington Hobby Crafters in Falls Church and the Great Train Store in Union Station. For information on this and other excursions, call the Washington chapter of NRHS at 495-9668.

Alexandria freelance writer Mark Morrow would love to blow the whistle on the 1218.