Between bursts of noise from the lawn mower in back of her home on Longfellow Street NW in the middle-class Brightwood Park neighborhood, Evelyn Shepherd is talking through a political question facing her and her neighbors: whom to vote for in the Sept. 14 Democratic primary for mayor.

"I was going to vote for Kane," said Shepherd, a medical technician who has worked for the D.C. government at the Walker-Jones Health Clinic for 16 years. But Betty Ann Kane dropped out of the mayoral race to seek reelection as an at-large member of the City Council. "Now I don't know what I am going to do," said Shepherd.

"Jarvis isn't ready for mayor," she said of City Council member Charlene Drew Jarvis, who represents Ward 4, Shepherd's ward.

"Ray, I don't know at-large council member John Ray. Maybe if I knew more about Patricia Roberts Harris . . . but from what I hear, I don't know about her.

"Barry may be the strongest," Shepherd said of incumbent Marion Barry, "but I don't like the way he's handled the budget. We're always running out of supplies at the clinic . . . . I'm not that crazy for him."

Shepherd's indecision -- with a slight leaning toward Barry at the moment -- closely mirrors what polls have shown regarding her neighbors in Ward 4 and adjacent Ward 5.

Those two wards, spanning from Rock Creek Park and 16th Street on the west to Bladensburg Road and the National Arboretum on the east, appear to be the key battleground in the primary as the campaign enters its final month.

A recent Washington Post poll showed Barry with a solid lead over Harris in Ward 4 (45 to 26 percent) and a smaller edge in Ward 5 (41 to 34 percent). They both got about 60 percent favorable ratings from voters polled in the two wards.

If Barry can hold his lead in Wards 4 and 5 or expand his edge, adding to a what already appears to be a strong lead in Ward 7 east of the Anacostia River, Harris' hopes of upsetting the incumbent could be doomed.

Harris, on the other hand, has to try to reverse Barry's standing in Wards 4 and 5, and hope that support in these areas, added to her apparent strong backing in Ward 3 on the other side of Rock Creek Park, can add up to a victory margin.

"It's all in the math right now," said Ivanhoe Donaldson, Barry's campaign manager. "The numbers are the name of the game . . . when it comes to the numbers of voters you can't ignore 4 and 5. That's where backbone-Washington voters are. If you lose them by a wide margin, you lose the election."

In fact, Barry did lose the wards in 1978 -- but by a narrow margin that allowed his overwhelming victory in Ward 3 to carry him to the mayor's office.

This election year, Barry's workers in Wards 4 and 5 are optimistic: "The mayor will win five comfortably," said Michael Frazier, who is in charge of Barry's Ward 5 office; "We're talking landslide," said Bill Hassan, co-coordinator of Barry's office in Ward 4.

Harris' supporters say they also are confident: "We are not as loud with what we do as some people, but on election day you'll see Harris taking Ward 5," said Leroy Coads, Harris' Ward 5 coordinator.

Vicki Street, the former school board member and Harris' Ward 4 coordinator, said she believes the race there is tight but she disputed that Barry has a lead.

The key issue in both wards, according to interviews with voters, campaign staffs and politicans in the wards, is the level of city services that residents get for their tax dollars.

In Evelyn Shepherd's case, the poor quality of city services is in the lack of tubes for blood testing at the clinic where she works.

For Tommy Rhodes, a barber who lives and works in Ward 5, it is the absence of city efforts to revitalize the 12th Street business strip.

For others there are questions about poor street repairs, rising tax assessments, slow responses by the District Building to questions and problems.

Demographically, Wards 4 and 5 are about 90 percent black and 10 percent white.

Many residents of both wards harbor deep pride in being Washingtonians, and there are numerous families who have lived in the areas for years, often for three or four generations.

Ward 4, which has no public housing, contains some of the city's most affluent neighborhoods, including the well-known Gold Coast of large, detached houses on 16th Street and the genteel winding lanes of North Portal Estates in the far northern tip of the city.

"Ward 4 has a lot of proud people who worked hard to achieve," Barry said in describing the ward. "You've got two-income families, husband and wife working to pay for the house. Those people don't just walk up there and get them."

In Ward 5, the Michigan Park area inclues some of the city's most beautiful homes. Neighborhood after neighborhood, from Brookland to Woodridge, features calm, clean streets and well-kept middle-class homes.

There is some public housing in Ward 5, and despite the affluence of some of its neighborhoods, the Trinidad area to the south is one of the city's poorest.

"There are a lot of teachers and professional people, doctors and lawyers in the wards," said Harris. "Many of them are in government service, both local and federal . . . they are well-educated people who want the government to function smoothly."

"Ward 5," said William Spaulding, the Democrat who represents the area on the City Council, "is a heterogeneous mix of people, but by and large they are a conservative group of citizens. They are adult homeowners with a serious interest in maintaining their property and their income in the face of inflation . . . "

Barry, the former street activist who wore dashikis when he came to Washington in the mid-1960s, has had to fight for acceptance in the two wards. He acknowledges changing his image.

"I'm different now," Barry said. "I had to do a lot of things to get attention back then. I'm the mayor now. I respect their values and their pride in Washington. I dress right to represent them right at the White House and other important functions . . . .

"I was at a meeting the other day, and everyone was going down the table saying they were fourth-generation Washingtonians. The next would say he was a fifth-generation Washingtonian. I was thinking what I would say when they got to me. When my turn came I said my parents were on vacation in Mississippi when I was born. I'm not responsible for where I was born . . . . "

The proud, educated middle-income blacks in Wards 4 and 5 that Barry is courting were thought to offer a natural political base to Harris when the race began. Harris, who now lives in Ward 4, lived in Ward 5 in the 1960s and was vice president of the Brookland Civic Association.

"I expected to be doing better there . . . those voters have a high standard for performance in government," Harris said. "They work hard for their money and they want their tax dollars to buy them a good government. I think one factor is that some city employes may fear that I am too demanding of excellence. They should know that I don't go around fingering people to be fired. I give leadership so that a job can get done."

Barry's inroads have been substantial. He has been endorsed by the Ward 4 Democrats, Ward 4 school board member Linda Cropp, Ward 5 council member Spaulding and Ward 5 school board member Bette Benjamin. As in the rest of the city, he has used incumbency to attract support.

In Ward 4, he mentions that before he came into office there were no city-sponsored summer jobs for teen-agers who did not meet federal poverty guidelines. "Because you make $25-, $30- or $40 thousand dollars doesn't mean your teen-ager shouldn't get a job," said Barry. "People in Ward 4 know I did that. They like it."

In Ward 5, he announces that he put new windowsills and bathtubs into Langston Terrace, a public housing project; that the Michigan Avenue bridge near Catholic University has been replaced; that there is a Metro stop at Brookland; that the new trash can, Supercan, has been a success; and that there is a new library in the ward's (and the city's) highest-voting precinct, Precinct 66 in the Lamond-Riggs area of the ward.

Harris, on the other hand, attacks the record that Barry cites. "These people are smart," she says. "They know what counts -- jobs, education, controlling crime.

"They are not fooled by Barry's explanations for why the city has failed to create more opportunities for young people to work, why he has been trying to make cuts in the school budget while raising their tax assessments. They can see crime going up even as he says it is going down."