The Maryland Department of Agriculture, in a protest of local pesticide laws, has threatened to bypass Montgomery and Prince George's counties this summer when it launches its annual assault on marauding gypsy moths and mosquitoes.

Maryland Agriculture Secretary Wayne A. Cawley Jr. said in letters Feb. 20 to the county executives of both jurisdictions that their recently enacted laws requiring that warning signs be posted when toxic chemicals are applied have created "serious obstacles" to the state spraying program. The two counties are the only ones in the state with such laws.

The state spends more than $1 million a year to control the spread of gypsy moths, which defoliate thousands of trees every year in Maryland. About 700 acres were sprayed for moths in Montgomery last year and 2,500 acres with about 3,000 houses were to be sprayed this summer; 10 communities were sprayed for mosquitoes. Figures for Prince George's were not available yesterday.

Cawley cited a recent state attorney general's opinion questioning the legality of the county laws, and said that for "several reasons" his agency would not be able to notify residents or post signs when pesticides are applied, as the laws require.

"The ordinances create "serious obstacles," Cawley wrote in one of the letters, a copy of which was obtained by The Washington Post. He was not available for comment.

Cawley's letter, which caught county officials by surprise, was the latest local development in a debate over pesticides being played out in an increasing number of communities.

The Montgomery County Council enacted emergency legislation this month requiring commercial pesticide sprayers to post warning signs when they use toxic chemicals on insects and weeds.

A similar measure was passed by the Prince George's council in October, and other local measures regulating pesticide applications have been passed or are being debated in communities in California, Illinois and Florida, said Stewart McKenzie, a Montgomery County Council legislative analyst.

The state has used carbaryl, also known as Sevin, to treat heavy insect infestations, as well as another insecticide known as Dimilin, McKenzie said.

The Montgomery council decided to enact its pesticide law because both widely used chemicals are suspected of causing cancer and because pregnant women, children and persons with allergies may be especially at risk, he said.

State Attorney General Stephen H. Sachs has held that pesticide regulation is solely a function of state and federal government, and in Annapolis, state lawmakers are considering bills that would overturn local pesticide ordinances on those grounds.

David G. Sobers, chief of environmental planning in Montgomery County, said the county met with state agriculture officials Friday and offered to produce the warning signs, which would be passed out to citizen groups for distribution in affected areas.

Tim Ayers, a spokesman for Prince George's Executive Parris Glendening, said the county's legal department has been asked to draft a response to Cawley. The Prince George's law contains exemptions that may free the state from its requirements, he said.