John Ray, Mayor Marion Barry's handpicked choice to succeed Barry on the City Council, won yesterday's special District of Columbia election, defeating his nearest rival, controversial former council member Douglas E. Moore, by a lopside margin.

Complete but unofficial returns from voting in the city's 137 precincts showed Ray with 26,671 votes-53 percent of all ballots cast. Moore received 18,294 votes, or 36.6 percent. Nine other candidates in the race to serve the remaining 19 months of Barry's at-large council term were far behind Moore and Ray.

The victory of Ray, a 35-year-old lawyer and relative newcomer to District politics, also was a victory for Barry. In addition to campaigning with Ray, the mayor turned over to Ray much of his campaign machinery, including fund-raising staff, strategists and organizers. The election was considered the first test of the new mayor's political clout.

Democrat Charlene Drew Jarvis, a psychologist at the National Institutes of Health, easily defeated 14 challengers for a seat on the 13-member City Council as the representative of Ward 4, a largely black, middle-class area in upper Northwest and Northeast Washington.

Jarvis, a political newcomer, will serve the unexpired 19-month term of Arrington Dixon, who represented Ward 4 on the council until he was elected City Council chairman last fall. Dixon endorsed Jarvis as his successor.

Jarvis, the daughter of medical researcher Charles Drew, who developed a reliable method of separating blood plasma, collected 3,615 votes, or 28 percent of the vote. Her closest opponent was Norman C. Neverson, a Xerox executive and community activist, who had 2,280 votes.

In the third election in the city yesterday, Eugene Kinlow, a 38-year-old administrator with the Department of Health, Education and Welfare, won a lopsided victory over nine other candidates for an at-large seat on the 11-member, politically non-partisan city school board.

Kinlow, chairman of the Anacostia Community School Board, will replace Betty Ann Kane, who won a seat on the City Council last year and endorsed Kinlow to serve out the remaining seven months of her term. The Anacostia board is an elected advisory group that has strongly favored imposing minimum standards through tests before promoting students from grade to grade and before graduating students from high school.

Kinlow said he wants to develop an incentive pay plan for teachers that would be tied to student achievement gains.

Ray won five of the city's eight wards, including Ward 7 in far Southeast Washington, which had been considered a Moore stronghold. A significant portion of Ray's victory margin came in Ward 3, west of Rock Creek Park, where he stacked up a 15-1 margin and a difference of 6,000 votes over Moore. Ray also won wards 1 (Adams-Morgan and LeDroit Park), 2 (downtown and new Southwest) and 6 (Capitol Hill).

Moore narrowly defeated Ray in Ward 4, and also won Ward 5 in Northeast Washington and Ward 8 in Anacostia.

Using the new Datavote system, city elections officials finished counting the ballots at 10:32 p.m. There are still 1,657 challenged and absentee ballots to be counted within the next week. Because of the victory margins, however, it was unlikely that the outcome of any of the three races would be changed.

Election officials said 51,091-or 20.3 percent of the city's 250,750 registered voters-took part in yesterday's election, which was only the second such special election in recent city history. Only about 35,000 voted in the first special election, held July 19, 1977.

Ray claimed victory shortly after 10:30 last night, telling a group of supporters gathered at the Harambee House Hotel on Georgia Avenue NW:

"We knew we would win, win big, and we are winning big.

"We spanked him, didn't we?" Ray said to Moore.

Moore, looking strained but cheerful, conceded defeat around 11:30, telling his supporters at the International Inn on Thomas Circle:

"This is the first campaign I've ever run in where we had a board-based coalition of labor, tenants, homeowners, teachers, firemen, police elderly and youth."

Moore said The Washington Post, which endorsed Ray, had "flattened me out, [but] I shall rise again."

Ray, who lives only a block away from Mayor Barry on E Street NE on Capitol Hill, grew up in Tom Creek, Ga., a small town that, Ray recalls,ceased to exist after the supplies of turpentine that were its principal trade item dried up.

Ray is a graduate of George Washington University Law School, and while a student there worked in the law firm of former Supreme Court justice Abe Fortas. After graduation, he was a law clerk for Judge Spottswood Robinson of the U.S. Court of Appeals.

Ray later became a legal counsel for the U.S. Senate antitrust and monopoly subcommittee and a legal counsel in the Justice Department. He is divorced.

The importance to Ray of Barry's active and generous political support was apparent yesterday. Ray's four-month-old campaign organization, replete with Barry regulars, showed a quick mastery of the political techniques of getting its voters to the polls by using many techniques that Barry and his associates had perfected in numerous District political campaigns.

Ray, whose most serious problem was a lack of name recognition, mailed out literature weeks ago and identified potential voters in early telephone canvassing. On election day, Ray workers were present at most key precincts to pass out literature. In one Southeast Washington precinct, a Ray worker took down the names of those who had voted to determine which Ray supporters identified in earlier canvassing might still need to be reminded to vote.

Ray's entry into District politics came as a foe of Barry. In October 1977, Ray launched a come-from-nowhere campaign for the Democratic nomination for mayor.

Eleven months later, after he failed to gain significant name recognition in the polls and also failed to attract adequate financial contributions, Ray abandoned his campaign and endorsed Barry. Ray became an active worker in Barry's campaign, helping to shore up support for Barry with some ministers and labor organizations in the city.

After Barry was elected Nov. 7, he endorsed Ray as his replacement on the council. On Jan. 8, the D.C. Democratic State Committee granted Barry's wish and chose Ray to fill the Barry seat until yesterday's election.

There were 11 candidates in the at-large Council race, but most observers considered it all along to be a virtual head-on clash between Moore and Ray.

Among the other candidates in the race, planner Hector Rodriquez, who ran unsuccessfully for City Council last year, and realtor Frannie Goldman who pitched her campaign to the same voters Ray targeted, were considered the best long-shot choices.

Three other candidates had run in past campaigns and lost-businessman Jackson R. Champion, parole officer Warren A. Hemphill Sr., and U.S. Labor Party organizer Stuart D. R [WORD ILLEGIBLE] The newcomers in the field were security consultant Lin Covington, business administrator David G. Harris, employment/specialist Richard Blanks Sr. and H. Chris Brown, a retired Air Force sergeant CAPTION: Picture 1, John Ray, left, joins hands with Mayor Marion Barry at his victory celebration last night. Ray told his supporters, "We knew we would win big . . ." By Ken Feil-The Washington Post; Picture 2, JOHN RAY; Picture 3, DOUGLAS E. MOORE