Dr. William Stuart Nelson, 81, former dean of the School of Religion and retired vice president for special projects at Howard University, died Saturday at Carroll Manor in Hyattsville.

Internationally known as an exponent of the philosophy of nonviolence, he had been a friend of the late Dr. Martin Luther King Jr. and Mahatma Gandhi. He had walked with both in protest marches.

Dr. Nelson, the only member of the Howard faculty to hold the special positions of dean of the university and then vice president for special projects, was a world student and traveler.

An ordained minister, Dr. Nelson was dean of the School of Religion from 1940 until 1949. He founded the Journal of Religious Thought, a schoolarly publication of the school now in his 34th year.

In 1948, he also was named to the newly created position of dean of the university, a post second only to that of the president. He held both deanships concurrently for a year.

In 1961, the position of vice president for special projects replaced that of dean of the university, and Dr. Nelson, under the new title, became responsible for the development of universitywide educational and research projects.

He developed the Howard University Community Service Project in Washington's old second police precinct to combat juvenile delinquency, illiteracy and other problems in one of the city's major trouble spots.

Supported by the university, foundation grants and 45 churches in the area, it was the forerunner of the Urban Institute for Religious Studies at Howard University.

Dr. Nelson's last job before his retirement in 1967, was organize and direct the university's yearlong centennial observance, which opened formally in September, 1966.

Born in Paris, Ky., Dr. Nelson grew up in Paducah. He graduated from Howard University in 1920. His education there was interrupted by World War I, when he served as an Army infantry lieutenant in Europe.

During the early 1920s, he attended Union Thelogical Seminary in New York and studied theology at Protestant Theological Seminary and the Sorbonne in Paris. He also studied at the universities of Berlin and Marburg in Germany.

While in Paris, he wrote a book on the Negro in America, "La Race Noire dans la Democratie Americaine," published in 1921.

Returning to this country, Dr. Nelson earned a bachelor of divinity degree from Yale University in 1924 and was elected a fellow of the National Council of Religion in Higher Education.

That same year, he joined the faculty of Howard University as a teacher in the School of Religion, and taught philosophy in the College of Liberal Arts. From 1929 to 1931, he was assistant to the president of the university.

Dr. Nelson then became the first black president of Shaw University in Raleigh, N.C. Five years later, he was elected the first president of Dillard University in New Orleans. It was created by merging two schools founded after the Civil War, Straight College, a Congregational school, and New Orleans University, supported by the Methodist Church.

He remained at Dillard until rejoining the Howard faculty.

In 1946, Dr. Nelson, and his wife, Blanche Wright Nelson, went to India on a special mission for the American Friends Service Committee of Phildelphia.

While trying to help bring together hostile Moslem and Hindu communities in Bengal Province, Dr. Nelson walked from village to village with Gandhi.

Later, he assumed major responsibility for the Friends Service relief and rehabilitation program that brought him into association with Indian leaders following that country's independence from Britain.

In 1949, the Calcutta University Press published his study, "Bases of World Understanding."

Dr. Nelson returned to India in 1958 as a Fulbright research scholar to further study Gandhi's influence on Indian life and thought.

In later years, he devoted further research to Gandhi's philosophy and its practical application, notably in Africa and the civil rights movement in theis country.

Dr. Nelson joined Dr. King in the march from Selma to Montgomery, Ala., in 1965.

He earlier had helped establish a course in Howard's School of Religion on the Gandhian concept of nonviolence. He taught the course and brought in Dr. King as a guest lecturer on several occasions.

He had been a vice president of the Greater Washington Educational Television Association and a member of the board of directors of the Washignton Federation of Churches, the International Student House of Washington and the Council of Churches of Greater Washington.

Dr. Nelson was a member of the Gandhi Peace Foundation in New Delhi, the Prison Chaplains Committee of the Federal Council of Chruches and the Fellowship of Reconciliation.

At his retirement, his friends established the William Stuart Nelson Scholarship Fund at Howard University.

He is survived by his wife, of the home in Washington.