The District of Columbia campaign for mayor dressed itself in biblical allegories, gospel hymns and symbolic sermons yesterday as the three major Democratic candidates went to church and asked a key segment of city voters to deliver them victory on Sept. 12.

Interrupting his political sermon from the pulpit of Southern Baptist Church, 134 L. St. NW, Mayor Walter E. Washington turned around to the choir and asked for one more chorus of the spiritual with the words, "Just look where I've come from. I've come from a logn ways . . ."

Across town at Plymouth Congregational United Church of Christ, 5301 North Capitol St. the Rev. Theodore S. Ledbetter decided to "depart from custom" and allow City Council Chairman Sterling Tucker to speak from the pulpit. Tucker said he came not to politick but "to worship with you."

"If you should happen to see my name on the ballot," he added with a grin, "just remember me."

Council member Marion Barry was on both sides of town pursuing the church vote yesterday. He stood with the visitors in the morning at Emmanuel Baptist Church in Anacostia, and in the afternoon introduced his mother, who had come up from Memphis, to the rows of elderly ladies in plumed and flower hats at Metropolitan Baptist Church in the Shaw area.

For decades, churches have occupied a central role in Washington's black community, and the coming of local elected politics in the past 11 years has brought them into focus as a major political forum.

The endorsement of influential ministers, the access to captive audiences of sure-shot voters, the enlistment of zealous and well-connected church club members as campaign workers are all coveted by Washington polticians.

The church is a source for election-day car pool drivers and vehicles, petition circulators and signers, telephone bank callers and campaign poster plasterers. Ministers are regarded by many like precinct captains in clerical cloth, and some politicians consider the church network more essential to victory than the city's regular Democratic party organization.

All three of the principal candidates for mayor have been stumping the churches weekly for the past several months and with the close campaign heading into the stretch this week, Sunday morning politicking has become a top priority item.

Statistics indicate that the key voter in this election is probably black, a woman, middle-aged and middle class. And the statistics also indicate that more than likely yesterday morning she was in church.

For each of the three candidates, church-going yesterday was a mirror of their relations to that institution in the past - Washington, the preacher's son-in-law: Tucker the moderate and middle-class civil rights activist, and Barry, the one-time black militant toward whom many conservative church voters have always been somewhat standoffish.

Washington began the morning at Metropolitan Baptist Church, one of the largest and most influential churches in the city, whose pastor, the Rev. H. Beecher Hicks Jr., has remained neutral during the campaign.

As mayor of the city, he was given the chance to speak from the pulpit, as Barry and Tucker had not been given on their earlier visits to the same church.

"I've made no bones about it. I'm a Christian. I believe in the strength of the Lord," Washington said,

"This election is about how your children and the next generation of children will be educated and whether they'll have a decent place to live," he said. "This election is about whether we as a city will remain strong with Christ to guide us and not some pornographic shop."

Reserved and wearing his glasses at Metropolitan. Washington loosened up at Southern, a small cream-colored brick building at 1st and L streets NW where one of the principal persons in his campaign organization, taxicab driver William J. Wright, is cochairman of the trustee board.

Soon after Washington and his wife-Bennetta - whose sister, Wilhelmina B. Thomas, is principal of the Walker-Jones Elementary School next door - were seated on the dias, the singing, swaying shouting and hand clapping began. It went on intermittenly for two hours, as television news cameras whirred.

"You might see yourself on TV and I don't want you to be all frowned up," the Rev. Charles H. Doom Jr. joked. "I want you to be looking like Christians."

Washington, clearly buoyed by The Washington Post poll published in yesterday's editions showing that he had come from behind to be in a neck-and-neck race for the lead with Tucker, preached for about a half hour to the audience, his hands waving and a raspy voice gasping at the end of his phrases.

The mayor said that, like the Old Testament figure Nehemiah who had rebuilt a wall around Jerusalem, he had rebuilt this city after the 1968 riots. "Im gonna keep on building. I'm not coming down off the wall," he said.

In his rambling, sermon, Washington ranged rapid-fire over a variety of topics. He talked about the fall of ancient Rome ("eroded becaue it had no strength from within") and about how he hda stopped plans for free-ways that had threatened city neighborhoods. He preached about his housing and hot meals programs for the elderly, then read from the Sermon on the Mount.

"I love everybody," Washington said, beaming broadly. That's what they complain about. They say I'm not hard enough."

Mrs. Washington, daughter of the late Rev. George O. Bullock of Third Baptist Church, also spoke. Appealing to women in the congregration and quoting from the Bible, she said, "For who knows that you have come to the Kingdom for just such a time as this."

Earlier in the day, Tucker, accompanied by his wife Alloyce and his 16-year-old daughter Lauren, had gone first to St. Stephen and the Incarnation Church, 16th and Newton Streets, NW, and praised the church for once being a harbor for American Indian and antiwar groups who had come to Washington to demonstrate.

He talked about his own efforts to help tenants on 12th Place NW secure low interest loans to purchase their homes and aoid being displaced by speculation. "We'd been saying to the mayor, help these people, without avail," Tucker said.

In case there was any doubt in the minds of those at Plymouth about where he stood, Ledbetter ticked off his tickets when Tucker finished speaking. Walter E. Fauntroy for Congress; Tucker for mayor, council member Douglas E. Moore for council chairman and H.R. Crawford for city council at large.

"You make the choice," he boomed. "But I'd be happy if you vote as I do." And Ledbetter smiled.