As many as 40,000 Maryland residents seeking to escape higher taxes and insurance costs are registering their cars in Virginia in violation of Maryland law, a practice that is costing the state up to $10 million in lost revenue.

Officials say a growing number of Marylanders have switched to Virginia in recent years, beating their home state out of millions of dollars in annual registration fees and excise taxes, as well as premiums for Maryland-based insurance companies. Insurance costs can run as much as $1,000 higher per year in Maryland than in Virginia, especially for motorists with bad driving records.

"We're losing $1.5 million a year just in registration fees, and that's a very conservative estimate," said Maryland Motor Vehicles Administration chief W. Marshall Rickert. "It's a lot of money."

"It's outrageous," said Baltimore police Officer Ed Sheeler, who has ticketed numerous offenders in downtown Baltimore in recent weeks. "It's a heck of a drain on Maryland."

Sheeler, an 18-year police veteran, said the offenders are "all types" -- rich and poor, old and young, male and female. Another traffic officer "stopped a woman the other day driving a Mercedes," Sheeler said.

What's happening is legal in Virginia but illegal in Maryland. Under the law used by Sheeler and other law enforcement officers -- including a special five-member investigative team in the state Motor Vehicle Administration -- offenders are charged with failing to register their cars in Maryland, a requirement for most persons living in Maryland for 30 days or more. An offense can lead to fines up to $500.

Officials say there is a similar but much smaller wave of District of Columbia residents registering their vehicles in Virginia.

The Maryland-to-Virginia exodus has drawn the governors' offices of both states into the fray and prompted extensive negotiations among high-level motor vehicle administrators to stop the registration.

In a letter to Virginia Gov. Gerald L. Baliles in June, Maryland Gov. William Donald Schaefer cited a "significant and growing number" of Maryland residents taking advantage of Virginia's tax and insurance breaks and asked for help. Baliles promptly answered, agreeing to seek ways to "curb this practice."

Virginia motor vehicle officials said this week they are still studying whether they can discontinue registering and titling out-of-state vehicles simply by administrative action or whether it will require changing the law in the state legislature next year.

Several officials said that, while the financial drain from Maryland is significant, the benefit to Virginia is small, because out-of-state residents registering cars in Virginia generally are able to escape most of its local taxes.

The stop-the-drain campaign is aimed primarily at Maryland's many so-called high-risk drivers. They are residents with poor driving records, who often must pay $1,000 or more in premiums annually under Maryland's compulsory insurance laws but who can pay only $300 a year into an uninsured motorists' pool if their cars are registered in Virginia.

Virginia is one of a handful of states that still does not require insurance for drivers. As a further inducement, Maryland residents registering their cars in Virginia are not subject to that state's personal property tax and usually do not have to pay Virginia's 3 percent use-and-sales tax on their vehicles, either. They are subject only to a $25 or $30 annual registration fee and a one-time $10 titling tax.

In contrast, in Maryland, a resident must pay an average annual registration fee of $30, and a one-time 5 percent excise tax based on the value of the car. That tax can come to hundreds of dollars, even on second-hand cars.

In addition, Maryland residents must purchase auto insurance, which is generally more costly than in Virginia. In 1985, the average premium in Maryland was $413.20, 13th highest in the country, according to Best's Insurance Management Reports, compared with Virginia, where the average premium was $307.61, 40th in the country.

Also, unlike Virginia, Maryland requires high-risk motorists unable to get commercial insurance to obtain coverage through the state-run Maryland Auto Insurance Fund, which charges an average premium of $1,332. The rates are lower in some parts of the state, including Prince George's and Montgomery counties, said MAIF executive director Vincent H. Howley, "but they can range up to $5,000, depending on your driving record."

MAIF rates also are scheduled to go up again in November, providing further incentive for high-risk drivers to go to Virginia, officials acknowledge.

A special five-member team of registration sleuths has been deployed on the streets and highways of the state by the Maryland Motor Vehicle Administration to spot suspect cars with Virginia license plates and issue tickets.

Suspicious cars in some cases are put under surveillance for up to 30 days in residential areas where they are parked each night, according to MVA investigative division chief Charles V. Kendall, so that investigators are satisfied that the owners are indeed Maryland residents.

The investigators have to be careful, Kendall said, because some out-of-state residents, such as military personnel and fulltime students, are permitted to live in Maryland without registering their cars in Maryland.

MVA's investigators have ticketed about 4,000 cars and recovered $1 million in lost revenue since 1985, an average of $250 per car, according to MVA administrator Rickert. With 40,000 Maryland cars still registered in Virginia, he said, that translates to a loss of $10 million in registration fees and excise taxes.

Both Maryland and Virginia officials agree on the estimated number of violators, compiled by Virginia officials several years ago and updated with forecasts of future increases. Kendall said most offenders are concentrated in Prince George's and Montgomery counties and in Baltimore, "but you find them all over."

MVA also has asked all local police jurisdictions to assist in nabbing offenders. In Baltimore, Officer Sheeler, who works the busy intersection at Baltimore and Calvert streets near the Inner Harbor, says his job is made easy because Maryland residents with Virginia tags often do not bother with the compulsory auto safety inspection in Virginia and thus do not have the telltale inspection sticker showing on their windshields. That's probable cause to stop them.

"How stupid can you get?" said Sheeler.