The Rev. Andrew J. Allen, 67, pastor of First Baptist Church of Deanwood and a leading figure in the Washington community, died Thursday at the church study. He suffered from diabetes.

Known as a boy preacher when he started preaching at the age of 12, Mr. Allen was ordained at Beulah Baptist Church in Washington in 1943. He became pastor of Deanwood church five years later.

While leading a church that became known for community service, Mr. Allen also took on other responsible positions.

He was a former president of the Baptist Ministers' Conference of Washington, D.C. and Vicinity, and a vice president of the Council of Churches of Greater Washington. He was founder and president of the Far Northeast Ministerial Alliance.

Mr. Allen also was a chaplain at Greater Southeast Community, Sibley Memorial and Columbia hospitals, and of the D.C. Federation of Civic Associations.

He had participated in city politics. In 1970, he was a member of a committee that supported the Rev. Channing E. Phillips for D.C. delegate in the House of Representatives. Phillips lost to the Rev. Walter E. Fauntroy.

Last year Mr. Allen supported former mayor Walter E. Washington in his unsuccessful bid for re-election. His strong backing of the mayor was not diminished in the least by his wit, as displayed at a prayer breakfast during the campaign.

"We thank Thee for our mayor," Mr. Allen said in the closing prayer. "Not because we think he is the best person in the world, but because we do not want him succeeded by the worst person in the world." He did not specify whom he had in mind.

Wit was a necessity as well as tenacity and hard work for Mr. Allen, who had not found life easy in his earlier years.

He was born in Richmond and graduated from high school there. He then entered Virginia Union University in Richmond, but after a year was forced to leave because of "economic irregularities."

For the next 20 years, he never lost sight of his hope for a college degree. He came to Washington in 1942, and found a job as an elevator operator. He also became an "aide" to the minister of Beulah Baptist Church, where her was ordained.

Mr. Allen eventually went back to Virginia Union University, commuting to Richmond each day from Washington. He earned his degree in 1956.

He believed in hard work for youngsters, but at the same time saw their need for recreational activities, which he provided through his church.

An impressive new sanctuary was built under Mr. Allen's guidance. During the week, the church provides a day-care nursery and a quiet study room for children where they can do homework after they get out of school.

He is survived by his wife, Gertrude E., of the home in Washington; a daughter, Andrea C. Hughey, of Washington; three brothers, the Rev. Willie B., of Washington, and Luther and John H., both of Richmond; two sisters, Ida James and Dora Allen, both of Washington, and two grandchildren. CAPTION: Picture, THE REV. ANDREW J. ALLEN