H. R. Crawford, a once controversial hard-line landlord and former federal assistant housing secretary who ran as "the worker's candidate," apparently won yesterday's close-fought Democratic D.C. City Council primary in Ward 7.

The 41-year-old Crawford was leading congressional aide Johnny Barnes by 143 votes -- 3,362 to 3,219 -- when city election officials finished counting regular returns from all of the ward's 21 precincts last night. School Board employe Emily Y. Washington was a distant third with 950 votes.

The Crawford-Barnes contest was the closest in the city since 1974, when Ward 5 Democrat William R. Spaulding defeated Leaford Williams by 56 votes, and its ultimate outcome was slightly in doubt last night.

Still to be counted are 344 special ballots cast by voters whose names, for a variety of reasons, were not on the registration lists at the precincts where they voted. In addition, about 20 absentee ballots must also be tallied.

Election officials said it would be next week before final counting is complete. In the past, such special ballots have generally mirrored the regular results, but the number of still untallied votes yesterday was sufficient to warrant reservations in both the Barnes and Carter camps.

Two at-large council incumbents, one of whom faced stiff opposition, were renominated yesterday. Jerry A. Moore, 62, a Baptist minister facing his strongest challenge in 11 years on the council, solidly defeated opponents Joseph N. Grano and Clinton B. D. Brown.

Unofficial results showed Moore the victor with 1,826 votes, to 1,426 for attorney Grano and 305 for Brown, also a lawyer.

Democratic at-large incumbent John L. Ray, with a quietly acknowledged eye on higher office, racked up a huge majority over challenger Raymond W. Powell, a 55-year-old business consultant.

Three Democratic ward incumbents who ran unopposed also were renominated: John A. Wilson, 36, was nominated for a third term representing Ward 2, which includes Foggy Bottom, West End, Dupont Circle and New Southwest; Charlene Drew Jarvis, 39, was nominated for a second term representing Ward 4 in upper Northwest Washington; and lawyer Wilhelmina J. Rolark, 62, was nominated for a second term representing Ward 8 in far Southeast.

Four Republican candidates were unopposed in their party's ward primaries: free-lance writer Ann Kelsey Marshall, 29, in Ward 2; retired D.C. government employe Israel Lopez in Ward 4; contractor John West, 47, in Ward 7; and businessman Leon Parks, 37, in Ward 8.

Winners of yesterday's contests will compete in the Nov. 4 general election.

Yesterday's election was characterized by little voter interest, with only 26,986 residents -- around 10 percent of the city's voters -- going to the polls despite bright sunny weather.

The primary saw none of the major foul-ups that have plagued past D.C. elections. In contrast to the May 6 election, when many voters waited for long periods while precinct workers fumbled with cumberson registration lists, voters' names were entered on individual cards, which were processed much faster yesterday.

Tough results will not be final until next week, a happy Crawford cautiously claimed victory.

"I hope they will recognize that we won this fair and square," Crawford told jubilant supporters gathered at St. Francis Xavier Church in Southeast Washington. "There are some sore losers, but we won this fair and square."

Meanwhile, by 11 p.m. Barnes had not conceded defeat. Aides said he planned to make a statement shortly.

Moore, reached a statement shortly before 11 last night at a victory party at the Roma restaurant on Connecticut Avenue, said, "I am very grateful that Republicans in this city have shown their confidence in me by making me their standard bearer again. I invite all the people who supported Mr. Grano and Mr. Brown to join ranks with me now so we can win in November."

Yesterday's primary, marked by low voter turnout, was an off-time election, falling between the May 6 D.C. presidential primary and the Nov. 4 general election, and midway between the quadrennial elections for mayor and City Council chairman.

In the last off-year council primary in 1976, moreover, Mayor Marion Barry, then a council member, worked hard to obtain a large vote that would foster his own hopes of winning higher office. This year, none of the council incumbents has overtly tried to use the primary as a springboard, though Wilson did raise $60,000 for an unopposed renomination bid and Ray told a reporter he, too, might seek higher office later.

The primary came at a time when the city and its often-criticized legislatiure faced a number of pressing unresolved problems, including a municipal budget crisis that threatens to linger for years to come. There is also a shortage of affordable housing in many parts of the city, continuing controversy over rent control and condominium conversion, chronic high unemployment and a trouble-plagued public school system.

Yet, most incumbents were unopposed, there were no sharply divisive ward of citywide issues, most of the city's emergent political powerbrokers sat out the campaigns and the most prominent one -- Barry -- refused even to get involved in the contest in Ward 7, to which he recently moved in search of a political base. Political observers said the mayor was unwilling to risk a political loss in his home ward.

Thus, the most active politics of this unusually hot and muggy summer were concentrated in two somewhat contrasting ends of the city: on the far eastern tip, Ward 7, an economically diverse, mostly black area, and on the western tip, Ward 3, largely upper class, mostly white and the power base of the city's miniscule Republican Party.

The fight to succeed retiring Ward 7 council member Willie J. Hardy came down early to a contest between Crawford and Barnes, the two candidates who attracted the most money, the most major endorsements, and the largest and most effective campaign organizations.

The race quickly became a campaign of negatives, with few substantive issues dividing the two men and with the charges and accusations growing increasingly pointed and personal. Interviews with voters leaving the polls yesterday indicated that many Ward 7 residents were choosing sides because of what they disliked about one of the two candidates.

Crawford was dogged by accusations, mostly from Barnes supporters that he had grown wealthy on controversial real estate deals. Barnes, on the other hand, was plagued by the charges that he was a "carpetbagger," and a political puppet of Hardy and his boss, Del. Walter E. Fauntroy.

Crawford, who ran unsuccessfully for the Democratic nomination to the council's at-large seat in 1978, ran this year determined not to repeat the mistakes of that campaign he said. He began early to counteract his image as a millionaire businessman by lining up major endorsements from labor unions, including the Greater Washington Central Labor Council, and from ministers. He touted himself on posters and on radio as "the people's candidate."

Barnes ran mostly on his resume, attempting to counter the "carpetbagger" charges by reciting to audiences his lengthy list of experience in community organizations. He also noted the endorsements of many elected officials, including Fauntroy, Council Chairman Arrington Dixon and U.S. Sen. Edward M. Kennedy of Massachusetts. He also was endorsed by The Washington Post.

Barnes' victory in a half-dozen of the ward's 21 precincts was centered in the areas immediately to the north and south of Fort Dupont Park, including Precinct 106 -- where Hardy, who supported him, lives -- and Precinct 110, the ward's largest. Crawford won everywhere else, including in the less affluent, church-going neighborhoods of smaller homes in the northern part of the ward such as Deanewood, Capitol View and Lincoln Heights, where Hardy was considered strongest.

Organized labor conducted a strong anti-Hardy (hence anti-Barnes) campaign in the ward, primarily because of Hardy's support of council legislation that cut back on workers' compensation benefits in the District of Columbia.

Moore, who had served on the council since his 1969 appointment by Richard Nixon, reminded Republican voters that as a liberal-leaning black, Baptist minister, he was the only Republican who could win a general election in this predominantly Democratic and predominantly black city.

Grano, on the other hand, exhorted Republicans to remember their traditional conservative principles, and he was a truer representative of Republican thinking.

Many Republicans who were supporting Moore during the campaign admitted that they did so reluctantly, and only because they knew Moore could win in November. Many said they personally preferred Grano, but did not think he had the experience or depth of the long-serving incumbent. b

Grano's vigorous campaign split the city's tiny Republican party, but also privided some of the first real excitement that many old-line Republicans remember in the party for decades.

The candidacies of both Grano and Brown were unique to council elections, since both campaigns grew essentially out of the historic preservation movement, giving Washington its first real dose of single-issue politics.