With solemn prayers and jubilant singing, handclapping and ecstatic shouts of joy and laughter, members of the First Baptist Church of Deanwood gathered Sunday to celebrate the end of their two-year, nationwide search for a new pastor.

Parishioners officially installed their "pastor-elect," the Rev. Joseph Gilmore, as the spiritual leader of their 79-year-old church in far Northeast. Gilmore, who suceeds the late Rev. Andrew Allen, answered the call to First Baptist from a church in Whitesboro, N.J.

A congregation of about 900 persons crowded into the modern, two-tier church to witness the pastoral installation, an event more significant to many church members than a presidential inauguration. Among the celebrants were many of Gilmore's fellow ministers in the Washington metropolitan area.

One old friend of the church, the Rev. Perry Smith III of First Baptist Church of Brentwood, Md., addressed the congregation with a special fervor.

Smith waited for the church choir to finish its rousing spiritual and the congregation to quiet down. Then, the tall, muscular, balding preacher, a bright red handkerchief in the front pocket of his black suit, stepped into the towering pulpit to lead the church in the "Installation Prayer."

"When Your children cried out, 'We need a leader,' You heard their cry," Smith said slowly, his eyes closed and head bowed.

"Yessir!" added an elderly deacon sitting at the front of the church. "Amen!," shouted a woman from the back of the church.

"Give him (Gilmore) power, Oh God. As You install him . . . hold him in the hollow of Your hand," Smith prayed, his voice rising to a shout, falling to an intense whisper or halting for emphasis. "Give him a message that burns . . . like fire on the inside. . . . Help him not to lift himself, but to lift You. . . . Amen."

"Amen," responded the audience, packed with busloads of visitors from Gilmore's former churches in Whitesboro and Philadelphia. The special service, attended by District officials, climaxed a week of church activities.

In his Installation Sermon, entiled "Guidelines For Governing God's People," the Rev. James Hall, Jr. of Philadelphia preached the congregation into an uproar of laughter, resounding "hallelujahs" and loud "amens." Hall, a longtime friend of Gilmore's drew parallels between Ephesus, a biblical city that Hall called "a vanity fair of ancient days, (a) center of commercialism and politics," and the District, "a great city," but "a hell-hole full of sin."

Wiping sweat from his brow with a handkerchief, Hall said, "I wish I could tell you that everything was going to be all right. . . . But man --" he paused, "-- you in Washington now, and you gonna catch Hell!"

Laughter filled the sanctuary. Someone yelled, "Tell it like it is, Reverend." With his head thrown back, eyebrows arched and finger pointing, the warmed-up preacher went on in a more serious vein?

"Sin is the same everywhere. The more you have to deal with, the more difficult it's going to be for you. Watch yourself (Gilmore). Be sure that you were not charmed by the beauty of this building . . . nor the size of this congregation. Guard your intellectual self. . . . Stay in touch with what's going on in the community. Walk with a certain dignity and speak with a certain authority, but be humble (so) that one will know God is with you. . . .

"I heard somebody say, 'Feed, feed the flock.'" Hall said. "Now, Joe, that's a tremendous responsibility."

Gilmore, 39, won the First Baptist pastoral election last December by a 241 to 72 vote. Being called by "the Holy Spirit" to go to First Baptist ("God gave me this mountain at 45th Street and Sheriff Road"), Gilmore left his small flock at the First Baptist Church of Whitesboro, N.J., where he had been pastor for eight years.

The 400 or so members at his old church "were in a state of shock" when he announced he was leaving, he said in an interview. "I had to build them up" so they could carry on without him, he said. He has been at his new church since April. "I look forward to a fruitful ministry here," Gilmore said.

Gilmore, who earned a bachelor's degree in sociology and religion at Rutgers University and completed seminary training at the Philadelphia College of Bible, has been a Baptist minister for 19 years. He and his wife Ethel, a school teacher, have four children.

Succeeding the church's former pastor, the late Rev. Allen, won't be an easy task for Gilmore, church spokesman said. Allen was an extraordinary, dedicated leader who amazed members and outsiders alike with his ability to swiftly move the church towards its goals, the spokesman added. He guided the church as it built and paid off the mortgage on its sanctuary at 45th Street and Sheriff Road NE and later bought surrounding lots.

The cornerstone of Allen's ministry was street-corner evangelizing, visiting the sick, counseling church members and organizing charitable endeavors for the poor, yet he also had a deep interest in city politics. He "passed" while hard at work in the church study in April 1979. His death stunned the church. And the members' search for a new leader -- an authoritative preacher with political savvy similar to Allen's -- was long and tedious.

"I'm glad that it's over. I feel relieved and happy because he (Gilmore) has already shown strong leadership," the Rev. Joseph Franklin, an associate pastor at Deanwood First Baptist, said in an interview.

"We love him already," says the Rev. Allen's daughter Andrea Hughey who grew up in the church. "I'm sure that he will increase our membership. He has aleady done that since he's been here." She says that since Gilmore started preaching in April, 25 people have joined the church and about a dozen inactive members have come forward to be reinstated.

"They (the members) called this man for leadership. I hope they let him lead," said the Rev. Milton Donelso, who served as acting pastor while the church searched the country for a new permanent leader. Gilmore becomes the church's fourth pastor in its 79-year history.

City Council members H. R. Crawford (D-Ward 7), Dave Clarke (D-Ward 1) and Betty Ann Kane (D-At-Large) were among the local officials who attended the service.

Crawford, a Catholic, read Mayor Marion Barry's "greetings to the pastor-elect, members and friends" of First Baptist Church, then gave his own personal greetings. "Welcome to an area with all kinds of things going on in the streets . . . an area where unemployment is high . . . and an area where this church has always been important," Crawford said. "We've always looked to this church (which is in Ward 7) for leadership and we certainly need you now."