Salvador de Madariaga, 92, an eminent liberal Spanish writer and historian and a former dipomat, died Thursday in Locarno, Switzerland, the Spanish royal household announced in Madrid.

Dr. de Madariaga was the Spanish ambassador in Washington for a brief period after the Spanish republic was established with the abdication of King Alphonso XIII in 1931.Because his government also assigned him to the League of Nations in Europe, he resigned his post in Washington and was named Spanish ambassador in Paris. He later served as minister of education and of justice until the outbreak of the Spanish Civil War in 1936.

He then went into exile in Britain and became a leading critic of generalissimo Francisco Franco. He did not return to Spain until 1976. In recent years he had lived in Locarno.

His numerous books include "Spain," a history of that country, and a trilogy on Spanish America, "Columber," "Cortes," and "Bolivar." He also wrote several other works on the history of Spanish America, in addition to numerous essays, studies and commentaries on current affairs, and newspaper articles. He wrote in English, French and German as easily as he did in Spanish and sometimes translated his own books into other languages.

Dr. de Madariaga was born in La Coruna, Spain. He was educated in France and then returned to Spain to work as a civil engineer on a railroad. In 1916, he moved to London, where he earned his living as a writer and became an expert on the English Romantic poets. In 1921, he joined the secretariat of the League of Nations in Geneva, Switzerland, and worked for several years in its disarmament section. He was a professor at Oxford University for four years before he began his career as an ambassador and minister in the Spanish government.

He married Constance Helen Margaret Archibald in 1912. They had two daughters. Following his wife's death in 1970, Dr. de Madariaga married Emelie Szekely Rauman. CAPTION: Picture, SALVADOR de MADARIAGA