Burtell M. Jefferson, the 56-year-old Washington native who became the first black police chief of the District of Columbia, will retire on June 30, after two years of private and public battles with Mayor Marion Barry. The latest conflict was over the size of the police department.

The retirement of Jefferson, who first joined the police force 32 years ago and became chief on Jan. 12, 1978, had been rumored for months. But Jefferson's decision to step down apparently was a sudden one, with Barry and City Administrator Elijah B. Rogers learning of the retirement only on Wednesday, and some police officials saying they were stunned by the announcement.

Barry praised Jefferson's stewardship of the department in a brief written statement, and Rogers said he and Barry spent more than an hour trying to persuade Jefferson to stay on through the end of Barry's term in 1982.

The officials noted that Barry's much-publicized crime reduction program "is just under way." But there was no official acknowledgement of friction between the mayor and the police chief.

At various times during his tenure, Jefferson, a by-the-book career policeman, and Barry, an aggressive, professional politician and former street corner activist, had disagreed often. They were at odds over police promotion procedures, the handling of a major internal police investigation and guidelines for dealing with the farmers' protest in February 1979.

Sources within the department said, however, that the catalyst for the retirement was a running conflict during the past year over the size of the police force.

Barry, determined to reduce the city's work force because of the worsening budget crisis, favored fewer police officers. But Jefferson, who had seen the size of the police department shrink dramatically over the past several years, contended that it should be expanded to cope with the city's rising crime rate.

Jefferson did not make that complaint public. But the sources said he told friends that Barry's insistence on scaling down the police force helped convince Jefferson that Barry was undercutting his ability to function as chief.

"Crime's rising and the mayor continues to cut manpower.The chief felt he was getting no support from the City Council and the mayor. He was caught in the middle," one police officer close to Jefferson said privately yesterday.

The official said neighborhood leaders were calling Jefferson and demanding more police protection, and Jefferson could not respond. "He was in a no-win situation," the official said.

The sudden retirement sets the stage for intense maneuvering within the top ranks of the department, and handicapping has already begun over who stands the best chance of being named to succeed Jefferson as the city's 25the police chief.

The leading contenders include three assistant chiefs: Maurice T. Turner, 45, who succeeded Jefferson in what is nominally considered the department's number two position, director of field operations; Marty M. Tapscott, 44, who heads the administrative services bureau; and Charles E. Rinaldi, 51, who is in charge of technical services for the 3.631-officer department.

A fourth principal candidate is Deputy Chief Isaac M. Fulwood, 40, a Jefferson confidant who was a lieutenant when Jefferson became chief and is now the department's top budget official.

Rogers said that today he will begin interviewing the department's four assistant chiefs and 11 deputy chiefs to select an acting chief to take over the department on June 30. He said it is "reasonable to assume" that a permanent chief, when finally chosen, will come from within the ranks of the department. The new chief would have to be confirmed by the City Council. Jefferson refused to talk about his retirement yesterday and secluded himself in his office. There he talked with many of his top officials and received calls from well-wishers. He planned a press conference today.

The news of Jefferson's retirement came as a surprise to many of the department's highest ranking officials. He informed them of the decision at a hastily called 11 a.m. meeting yesterday that was videotaped for showing to the department's rank-and-file officers during roll call. "Everyone was stunned," said one official who attended the meeting. "Nobody said anything. Nobody smiled. It was like a state of disbelief."

Jefferson's departure comes at a time when reported major crime in the District is on the rise, increasing 13 percent in 1980 over the previous year. So far this year, it is continuing on its upward spriral. The mayor and the chief last month announced a 13-point plan to combat crime, which involved more citizen participation.

With recent announcements of a $60 million potential deficit in the city budget, sources said yesterday, the chief feared that the police department would have to take further cuts to help make up the deficit.

The sources said the chief was also bothered by the mayor's interference in internal problems within the department. Two years ago, Barry interceded in a controversy involving allegations that Deputy Chief William Trussell, then head of criminal investigations, was incompetent and had made a racial slur. A special three-member panel exonerated Trussell of the charges.

Still, the mayor and his aides became convinced early on that the chief was not moving quickly enough to resolve the controversy, and ordered Jefferson to meet with dissident officers, against the chief's will.

In February 1979, Barry publicly overruled Jefferson by allowing thousands of farmers demonstrating on the Mall to have one last tractorcade protest. Jefferson had previously announced there would be no more tractorcades because the farmers had disrupted traffic, and violated previous agreements with the police.

The chief's exit will be more than a mere bureaucratic divorce for Barry, an often beleagured chief executive who came to power with a narrow base grounded primarily in the city's younger, more liberal and, in many instances, white voters.

Jefferson represented one of Barry's few ties to a segment of Washington with which the mayor has never been on good terms -- the Washington of black Shriners and Elks lodges, of Southern Baptists, church-basement suppers and small-town values.

Jefferson, a divorced man with two grown children who lives with his mother, is the kind of person who has been known to keep an open Bible on his desk, who is an active Mason, and who loves the sport of boxing.

He has never been politically or socially close to Barry, but has generally kept those differences close to the brass buttons on his chest.

Jefferson enjoyed a special respect in Washington as the first black police chief of a once segregated nation's capital. A year ago, Jefferson told an interviewer that when he joined the department in 1948, there were no legal restrictions on blacks but there was an "unwritten policy."

Blacks, he said, were not allowed to patrol in squad cars, could not police white neighborhoods and were barred from even the semiprestigious sex crimes, auto theft and check fraud details -- let alone the homicide and robbery squads.

Jefferson worked first as a special investigator for the U.S. attorney, and subsequently was assigned to the department's morals division. He made detective in 1960, detective sergeant in 1963, lieutenant in 1968, captain in 1971, inspector in 1972, deputy chief early in 1974 and assistant chief in December of that year.