The District of Columbia's long population decline apparently ended last year as the number of city residents held steady for the first time since 1967, according to U.S. Census Bureau estimates.

The city's population was 623,000 in mid-1984, the same as a year earlier, the Census Bureau said. Over the last 16 years, according to census figures, the number of Washington residents fell by 168,000 -- a decrease of 21 percent. Since 1980, however, the District's population loss has slowed.

Demographers suggested that the decline in the population loss may stem from a "bottoming out" of the exodus of middle-income black families to the suburbs. There also has been a slight upturn in births after the major baby bust of the 1970s.

"It may well be that there are only so many of the sorts of families that are going to move to the suburbs," said Donald Starsinic, chief of the Census Bureau's state and national estimates branch, which prepared the new figures. "And most of them may have left by now. Also, there appears to be an improvement in the quality of the schools, which would encourage parents to stay in the city rather than move out."

The new report also shows an increase in population growth in both Maryland and Virginia. In Maryland the estimated population last July was 4,349,000, a rise of 50,000 in a year and 132,000 or 3.1 percent since the 1980 census. In Virginia the population increased last year by 80,000 to 5,636,000, a gain of 289,000 or 5.4 percent since 1980.

The District's population fell by 15,000 or 2.4 percent between 1980 and 1983 before leveling off last year, but that decline was far less than the city's population loss during the 1970s, which averaged almost 12,000 a year.

Overall, the population of the United States reached 236.2 million in mid-1984, a gain of 2.1 million in a year. The Census Bureau said national population growth is down slightly from its rate during the 1970s, but noted that important shifts have occurred. Although the fastest-growing states still are in the South and West, the population has picked up in the Northeast and Midwest -- sections whose economies have rebounded over the last two years. Migration to the Sunbelt appears to have slowed as has growth in nonmetropolitan areas.

Based on 1982 and 1983 figures, the population of many big cities, including New York and Richmond, which fell sharply during the 1970s, appears to have stabilized or turned upward.

In the Washington area the 1983 figures show an increase in Alexandria and a very slight drop in Arlington. Both share many central-city characteristics with the District and lost population during the 1970s.

The District of Columbia figures were issued by the Census Bureau along with those of the 50 states, but no 1984 estimates have been issued yet for individual cities or counties.

"Many cities have improved their images in the past few years and Washington is one of them," Starsinic said. "They just can't keep losing people by leaps and bounds. That doesn't mean that they're going to grow again rapidly, but there does seem to be an important change."

Although the new figures give no breakdown by race, 1983 estimates by the District of Columbia government show virtually no change since 1980 in the city's racial composition, which was just over 70 percent black.

Gan Ahuja, the District's chief demographer, said the numbers of both whites and blacks appears to have stabilized. Among whites, Ahuja said, slightly more are moving into the city than moving out, which is similar to the pattern of the late 1970s. This is offset by a slight excess of deaths over births, though this "natural decrease" is much less than it was a decade ago.

Among D.C. blacks, births exceed deaths by about 3,000 a year. There is a net outmigration of about the same number, Ahuja said, but it is far smaller than the average net outflow of about 10,000 blacks a year during the last half of the 1970s.

According to the Census Bureau, the number of people of all races leaving the District last year exceeded those coming in by about 3,300. This net outmigration has dropped steadily from about 9,000 in 1981.

The District's estimated population reached a peak of 900,000 in 1943 during World War II. It fell to 802,178 in 1950 and 763,956 in 1960, as whites streamed to the suburbs but were largely replaced by blacks coming from the South.

As the racial change continued, Washington's total population increased to an estimated 798,000 in 1963, the last time city's population grew. In 1967 it held steady at 791,000, before tumbling to 778,000 after the 1968 riots. By the 1970 census, the population of both blacks and whites was heading downward and the District had 756,668 residents, about 71 percent black.

The new population estimates are based on several complicated formulas, using birth, death and housing unit statistics, school enrollment reports and data from income tax returns and Medicare records.