Mills Dean III, 80, a naval engineer who was president of the National Capital Trolley Museum for 17 years, died of cancer July 27 at a hospital in High Point, N.C. He had lived in Thomasville, N.C., for the past 25 years.

Mr. Dean was born in Havana and grew up in Washington. As a boy, he rode the District's streetcars -- which operated from 1862 to 1962 -- to school and to downtown movie theaters, forming a lifelong fascination with trolleys and travel by rail.

After graduating from Western High School, he studied engineering at a technical college before joining the Navy during World War II. From 1945 until his retirement in 1980, he worked at the David Taylor Model Basin, now part of the Naval Surface Warfare Center's Carderock Division in Bethesda.

Mr. Dean worked in the instrumentation department, helping design waterproofing for strain gauges used to measure the pressure on the hulls and propellers of submarines.

He helped develop ship and submarine instrumentation and pressure-resistant containers to enclose electronic equipment. He also participated in projects to help Navy ships move more quietly through water.

Mr. Dean continued to nurture his interest in rail transportation. He traveled the world to study streetcar systems and trains. He took tape recorders to remote parts of the United States to record train whistles and some of the final huffs and puffs of the country's last steam locomotives.

He also was fascinated by unusual musical instruments. He enjoyed the steam-driven calliopes used in circuses a century ago and, for years, he owned an odd combination of a piano and violin. The instrument consisted of an upright piano with a violin mounted on the back. It operated like a player piano, with a metal cylinder causing the piano and the violin to play at the same time.

The National Capital Trolley Museum was founded in 1959 in Baltimore. After Mr. Dean became its president in 1963, he helped engineer the museum's move to Colesville, near Wheaton. He was instrumental in having a mile of track installed for demonstrations and rides in vintage streetcars. He learned to operate the trolleys and liked to dress in an operator's uniform and hat.

After a fire in 2001 destroyed eight historic trolley cars, the museum was left with a collection of 16 on display, including eight from the old D.C. trolley system.

The museum also contains a scale model of Washington's streetcar layout of the 1930s and other artifacts of a bygone age.

Mr. Dean retired as president of the museum in 1980, but he continued to travel the world for many years to negotiate purchases of antique trolleys for the museum.

In April 2004, the museum named its transportation library in his honor.

After moving to North Carolina in 1980, he was a volunteer operator for the Charlotte Trolley, a short streetcar line in downtown Charlotte.

For most of his life, Mr. Dean lived in Brookmont, near the old trolley line that ran from Cabin John to Georgetown.

Mr. Dean's first marriage, to Jenny Dean, ended in divorce. His second wife, Marty Woloshuk Dean, died in 1995.

Survivors include his wife, Geraldine Dean of Thomasville; a stepson from his second marriage; three stepchildren from his third marriage; and nine grandchildren.

Mills Dean III, left, Harry Dodge and Bob Gladfelter review construction plans in 1966 for the National Capital Trolley Museum in Colesville.