Citing a dramatic increase in car thefts, D.C. Mayor Marion Barry and Police Chief Maurice T. Turner Jr. announced a citywide advertising campaign yesterday aimed at teaching owners to prevent such thefts and increased undercover efforts to catch thieves.

"This campaign marks the beginning of a widening regional campaign to unify our local jurisdictions in alerting the public to the growing national problem of car theft," Barry said during an afternoon news conference at police headquarters. "Our message is, 'Lock out car theft -- you are the key to prevention.' "

Last year, car theft cost local residents and business more than $22 million in lost cars and higher insurance premiums, Barry said. Nationally, the financial loss was $5.1 billion, he said.

More than 6,100 cars were stolen in the District last year, a 22 percent increase over 1985.

That upward trend has continued in the first four months of 1987, when car thefts increased 12 percent over the same period last year.

In Prince George's County, 6,570 cars were stolen last year, marking a 25.6 increase over 1985. In Montgomery, 2,280 cars were stolen in 1986, a 16.2 percent increase over 1985. In Fairfax County last year, car theft increased 15.2 percent over 1985.

Turner said the Metropolitan Washington Council of Governments had formed a task force against car theft that includes police chiefs from 19 jurisdictions.

Funded by local businesses, the city campaign will include warnings on milk cartons, grocery store food bags, Metrobuses and car wash litter bags for owners to lock up their cars. In 26 percent of the 6,100 car theft cases in the District last year, owners left keys in the cars, according to police statistics.

The city's 1st Police District, which includes parts of Shaw, the old downtown, Southwest and part of Capitol Hill, registered the greatest number of car thefts last year: 1,089. The greatest percentage increase -- 45 percent last year over 1985 -- occurred in the 7th District, which is in far Southeast below Pennsylvania Avenue.

Turner said that about eight of every 10 cars stolen in the District are returned to their owners, at no charge to the victim. Other juridictions charge towing and storage costs to owners when they claim their cars, he said. Turner estimated that more than three-quarters of the cars stolen are used for "joy riding," often by juveniles.

In 1981, 31 percent of the 1,168 persons arrested for car theft in the District were juveniles. Last year, 41 percent of the 2,495 arrests were of juveniles, police said. Unauthorized use of a vehicle is a felony offense, which carries up to three years in prison.

Officials could not explain the rise in car thefts. But the mayor said that he believes "the glamorization of cars, the glamorization of drugs and other things on television is contributing to the mindset of our young people."

"What appears to be a joy ride for many of our teen-agers will ultimately result in a ride to jail," Turner said. The campaign will include radio messages aimed at youths that say, "There is no joy in joy riding in the District of Columbia."

For 22-year-old Eric Lieberman, whose 1978 Buick was stolen three weeks ago from a parking lot near Dupont Circle, the crackdown is too late. The car is still in the shop where its broken steering column is being repaired and he's relying on friends and public transportation to get around town.

"There's no accounting for the incredible hassle that comes with this," Lieberman, a Senate staff member, said in an interview yesterday. "Someone went joy riding in my car, which gave them eight hours of fun and has caused me three weeks of anguish."