Nathan F. Twining, 84, a retired Air Force general who was chief of staff of the Air Force and chairman of the Joint Chiefs of Staff, died of cardiopulmonary arrest yesterday at the Wilford Hall Medical Center at Lackland Air Force Base, Texas.

Gen. Twining began his military career as an infantryman in the Oregon National Guard in the Mexican border campaign in 1916. In World War II, he commanded three air forces--two in the Pacific and one in the Mediterranean--and flew combat missions with all three.

He was Air Force chief of staff from 1953 to 1957. He served as chairman of the Joint Chiefs of Staff, the nation's highest military post, from 1957 until retiring from active duty in September 1960.

His decorations included three Distinguished Service Medals, two Legions of Merit, the Distinguished Flying Cross, the Bronze Star Medal, and two Air Medals.

In January 1943, Gen. Twining took command of the 13th Air Force, whose mission was to provide air cover for operations in the Solomon Islands.

Later that year, the heavy bomber on which he was flying a mission was forced down in the sea at night. The plane sank in less than a minute. Gen. Twining and 14 others were left with two rafts, each designed for six men. For provisions the group had one chocolate bar, a can of sardines, and a canteen only half full of water.

During the six days they spent on the rafts, they beat off a shark attack with their paddles. They survived on rain water they were able to collect and two albatrosses they shot and ate raw. All 15 men were suffering from starvation, fatigue and sunburn when they were rescued by Navy seaplanes.

In January 1944, Gen. Twining succeeded Gen. James Doolittle as commander of the 15th Air Force in the Mediterranean. Under Gen. Twining's direction the 15th gave tactical support to Gen. Mark Clark's Fifth Army, covered landings in southern France, and carried strategic bombing forays into Germany, Austria, and the Balkans. These strikes included the famed raid on the Ploesti oil fields in Romania.

After the fall of Germany, Gen. Twining returned to the Pacific, this time as commander of the 20th Air Force. His B29 Superfortresses pounded the Japanese home islands and dropped the atomic bombs at Hiroshima and Nagasaki.

After the war, Gen. Twining headed the Air Materiel Command and the Alaskan unified command before becoming a deputy Air Force chief of staff for personnel in May 1950. Later that year he was appointed Air Force vice chief of staff, a post he held until succeeding Gen. Hoyt S. Vandenberg as chief of staff in June 1953.

During his years as head of the Air Force and as Chairman of the Joint Chiefs, Gen. Twining gained a reputation for easing the acrimonious controversies that characterized inter-service relations in the immediate post-war years. He played an important role in the development of nuclear weapons and the supersonic aircraft and missiles designed to deliver them.

After leaving the Air Force, he was vice chairman of the Holt, Rinehart, and Winston publishing company. In recent years he had lived in San Antonio.

Gen. Twining was born in Wisconsin and reared in Oregon. After serving as a National Guard corporal in the Mexican border campaign, he entered the U.S. Military Academy at West Point, graduating in 1918. He later graduated from the Command and General Staff School and the Army's advanced flying school. Before World War II, his assignments included service with fighter squadrons, as a flying instructor and in a number of staff posts.

Survivors include his wife, the former Maude McKeever of San Antonio; two sons, Nathan A. of Baltimore, and retired Air Force Maj. Richard G. of Clearwater, Fla., and a daughter, Olivia Twining Hansell of San Antonio.