In Mount Rainier, just across the District line in Maryland, the derelicts are so numerous that the police chief keeps a file on 25 of the regulars, with their pictures and the names and addresses of relatives or friends who can be contacted when one of them gets sick or drops dead on a city street.

But lately the police have been arresting the derelicts in an effort to drive them out. City officials also are cracking down on people who do not trim their lawns and keep their homes in shape. And the city plans soon to begin handing out awards for "Best Flower Garden" and "Most Improved Lawn."

A new spirit of public uplift is sweeping Mount Rainier, an old Prince George's County suburb of 7,361, long known for its loan companies, all-night liquor stores, lottery outlets and the panhandlers who sip liquor from bottles in front of the old Metro bus depot on Rhode Island Avenue and 34th Street.

Some of the recent changes can be traced to last May's election, when voters swept the old guard out of office. The former council members, all longtime residents ranging in age from 51 to 74, were replaced by a new generation of leaders, all younger than 37, who reflect the growing number of young families in the community.

The new mayor, Stanley Prusch, an energetic 70-year-old, was the maverick of the previous council. Now he is affectionately called "the wandering mayor" because of his daily jaunts through city neighborhoods, seeking out overgrown lawns, abandoned cars, and houses with code violations.

"We're trying to turn this city around. We want people to improve their homes, get the junk cars out of the yards and make this look like the old Mount Rainier," said Prusch, a retired federal employe who speaks with a slight Irish brogue.

Mount Rainier's tree-lined streets themselves tell the problems: They are lined with attractive, but aging, Cape Cod-style homes with wide backyards and front lawns. It is not unusual to see a boarded-up or badly rundown house standing next to a well-kept home with potted petunias on the front banister and a freshly painted porch swing.

Despite its small-town trimmings, Mount Rainier has big-city problems when it comes to crime. Several store owners said that they have been burglarized, robbed at gunpoint or both.

Harry's Market--at the same spot on Rainier Avenue since it was opened 59 years ago by Harry Weinstein and his wife, both Russian immigrants--has been robbed four times. Now the store, which still sells penny candy from a jar, closes at sundown.

After she was robbed in daylight by a man wielding a knife, Young Song put bars on the windows, a protective metal screen on the door and an alarm system in her tiny grocery store. Her store also was broken into during the last big snowstorm.

There are drug deals taking place in the parking lot of Bass' Liquors, one of the larger stores on Rhode Island Avenue, says Police Chief Everett G. Husk.

"I used to walk these streets alone as a young girl," said council member Alice Zickafoose, who grew up in Northeast Washington, and whose grandparents lived in Mount Rainier. "Now I won't allow my children to do it."

But even before the increase in crime, change was quietly overtaking Mount Rainier.

The city has long had one of the oldest populations of any Prince George's jurisdiction. But that trend clearly is changing. Between 1970 and 1980, the number of residents 60 years old and above dropped from l9 percent to 18 percent, according to U.S. census figures, while the countywide senior citizen population increased by 36 percent.

The most populous age group in the city today is under 35.

The Prusch family's experience is fairly typical of past population patterns in the city. Prusch and his wife Pauline have lived in the same house since 1949. But none of their five children, now grown with families of their own, settled there.

"The old people are dying off or going off to nursing homes," Prusch said. "Young people are moving into their homes. Many of them are black and Hispanic."

In 1970, blacks made up 4 percent of the city's population. By 1980, they accounted for 32 percent; a phenonomenal jump for a place that until the 1940s had required blacks to be off the streets by sundown.

Although many of the newly arrived blacks live side-by-side with whites on the residential blocks, the greatest concentration is in the 962-unit Kaywood Gardens apartments, one of three major apartment complexes in the city.

Despite the increase in their numbers, no blacks ever have been elected to office in Mount Rainier and only two have tried. There is one black on the six-member city police force, but most blacks employed by the city collect its trash or maintain its streets and equipment.

Vestiges of the old racial tensions remain. Some residents still display the Confederate flag, as does the local bar, Judge Roy Bean, which specializes in country and western music.

One Sunday morning a month ago there was a racial confrontation on Eastern Avenue, which is the dividing line between the District and Mount Rainier. The incident began, according to a Mount Rainier policeman who was on the scene, when two whites shouted racial slurs at some blacks in a gasoline station just across the line in the District.

The crowd swelled to about 85 blacks and 15 whites (including some Mount Rainier volunteer firemen) and, as it moved into Perry Street in Mount Rainer, fighting began, the officer said. No one was hurt, but before the fight was broken up, a white man from Chillum was taken away by D.C. police.

"I think a lot of tension still exists between the older residents and the black residents," said council member Jon Moran, a landscape engineer, who at 29 is the youngest member of the council.

Most of the time, the racial tension takes subtle forms. Linda Wolfson, a Mount Rainier resident, said she has noticed that the whites who attend Northwestern High School, which serves the Mount Rainier community, use one bus stop, while black students who go to Northwestern use another.

Wolfson said, however, that there are virtually no problems on her block, which is about evenly divided between blacks and whites and includes two Hispanic families, an Indian family and one in which the wife is Vietnamese.

There is no busing for desegregation purposes in Mount Rainier area schools; black and white families united to oppose the county's school busing plan when it was proposed in 1973.

Mount Rainier is also a place where residents of a predominantly white neighborhood raised $300 for a black family whose house had caught fire, recalled Cecilia Wendel, another resident.

"People were really torn apart by what happened to that family," Wendel said.

The ethnic community in Mount Rainier has not grown as rapidly as the black population, but it is a highly visible presence nonetheless: The Mount Rainier Pharmacy is run by Pakistanis; the night manager of one of the Rhode Island Avenue liquor stores is Lebanese; a grocery is run by Koreans, and a pizzeria is owned by a Hispanic.

"It's a real melting pot," said Wendel, who is president of the Mount Rainier Elementary School PTA. She said that her neighbors include a Howard University professor, a D.C. government employe, a retired optomologist, a welfare family and the dean of the Catholic University night school.

Many of the young families say that they decided to move into Mount Rainier because of its convenience and cost: It is just five miles to downtown and has moderately priced rental units and houses that sell from $50,000 and $80,000. The town's tax rate, 75 cents per $100 of assessed value (in addition to the basic county rate), has not increased in 15 years.

Despite the town's problems, a recent meeting at Mount Rainier's storefront city hall was dominated by some of the more mundane problems that concern its citizens:

* Elementary school parents told the mayor and council that they wanted to place posters on the poles along one street to discourage speeding motorists.

Marilyn Rainey stood up and said that the problems with speeders gets so bad that "I'm almost tempted to get my late husband's police whistle and blow it at them."

* Frank Williams wanted to know why the police were not ticketing "all those cars with D.C. tags" that ignore stop signs. "I've been livin' here 31 years and I'm sittin' out there and I see this," Williams admonished the police chief.

* Former mayor Lavinia M. Nalls, who has not missed a meeting since she left office, wanted to know why the trees in her neighborhood have not been sprayed for mosquito control this summer.

* And Mayor Prusch reminded the citizens of his pet project: getting the county to convert the old junior high school, closed for a number of years, into a recreation center that also would house city offices.

He added that he has urged Metro officials to tear down or close the bus depot on Rhode Island Avenue, which he says "has a horrible stench created by the drunks urinating inside and outside the building."

As the mayor spoke, cars double-parked in front of the all-night liquor stores on Rhode Island Avenue, and a couple of derelicts settled down to sleep in the depot.