Nils Erik Wahlberg, 91, a pioneer in the automobile industry, died Thursday at Georgetown University Hospital. He had been a resident of Washington for the last 20 years.

Born in Finland of Swedish parents, Mr. Wahlberg earned an engineering degree from the University of Zurich in Switzerland.He came to this country in about 1908 and settled near Detroit where he became associated with General Motors.

When Charles W. Nash, then president of General Motors, resigned in 1916 to form the Nash Motors Co. in Kenosha, Wis., he took Mr. Wahlberg with him as vice president for engineering and research.

When Mr. Nash formed the Nash Kelvinator Co. in 1937, moving headquarters to Detroit, Mr. Wahlberg remained at the Kenosha plant, commuting from his home of many years in Chicago.

He was credited with leading the development of the first American compact car, the Nash Rambler, which was introduced in 1950.

Mr. Wahlberg also had played a major role in other developments in the auto industry, including the fresh-air heating and ventilating system, which was introduced by Nash.

Mr. Wahlberg retired in 1952, two years before Nash and the J. L. Hudson Co. merged to become American Motors, which still builds its cars in Kenosha.

He is survived by his wife, Katharine White Wahlberg, of the home here.