A Soviet policeman attacked an American diplomat inside the U.S. Embassy grounds here yesterday, grappling with him and ripping his jacket in an incident that brought a "strong protest" from the embassy.

Second Secretary Raymond F. Smith, a specialist in Soviet internal political affairs who has followed dissident activities here, was unhurt in the attack, which occurred about mid-day after Smith walked past the policeman on his way to an apartment entrance in the embassy's cramped compound on Tchaikovskovo Street.

According to American sources, the policeman grabbed Smith unexpectedly from behind and wrestled him briefly.

"The entire incident occurred on embassy property and therefore constituted an intrusion onto embassy grounds," said a spokesman. "A strong protest is being lodged with the Soviet Foreign Ministry."

The attack on Smith is the latest in a series of nasty accidents which many in the small American community of diplomats, businessmen and journalists believe is a consistent, increasing pattern of harassment reflecting hardening Soviet attitudes toward its relations with the United States. Others here, however, believe that in this instance the policeman mistook Smith for a Soviet citizen and sought to prevent him from entering the embassy building.

The gray uniformed "militia" that guards the front of the building from four positions is ostensibly there to ensure embassy protection. In fact, militiamen are posted to prevent Soviets from entering the building. They frequently stop Russians from entering, and sometimes have dragged them off.

In June, Soviet police dragged American businessman Francis J. Crawford from his car and jailed him for two weeks in Leftortovo Prison on currency charges. He was released June 27 in custody of the U.S. ambassador. The charges are still lodged against him.

Last week, a U.S. commercial attache on a weekend visit to the American commercial office next door to the embassy was barred by a guard from entering the building. The policeman insulted the diplomat, then flipped a lit cigaret in his face before moving aside.

Smith spent last week representing the U.S. government at the trial of dissident Anatoly Scharansky. Smith, along with the journalists and dissidents barred from the trial, was photographed many times by the secret police.

Penetration by the policeman into embassy territory - which is technically considered American, although the embassy leases the building and grounds from the state - is highly unusual. A similar incident occurred, however, within the past year when a Soviet policeman grabbed a New Zealand diplomat inside the Dutch Embassy and hauled him into the street.

More than three weeks ago, a group of Soviet Pentacostalists got past the guards and have occupied the consular section of the embassy ever since. They say they will only leave to go to America.

Meanwhile, Crawford, the American businessman, has returned to his office in Moscow, going about as if little had happened.

But he still faces charges of "systematically" violating Soviet currency laws and has been barred from leaving the country. No date has been set for his trial.

His employer, International Harvester Co. of Chicago, has informed the Soviets that it will conduct no further business with them while the charges remain against Crawford.

A company spokesman has denied rumors that the company had gone ahead with some deals while Crawford was in custody.