Mohammed Hemmatipour, a student at the University of the District of Columbia, had just stepped off the curb at Connecticut Avenue and Porter Street last week when the police car pulled up beside him.

"Did you know you were jaywalking?" one of the officers inside the car asked. Hemmatipour, carrying an armload of groceries, made a noncommittal reply.

The policeman's eyes narrowed. "Are you Iranian?" he asked abruptly.

"Yes," Hemmatipour answered.

In quick succession, the 24-year-old student's wrists were handcuffed, he was loaded into the cruiser and driven to the precinct station. There, while he was fingerprinted, the two arresting officers accepted congratulations from their fellow policemen for picking up an Iranian, Hemmatipour said.

"Give me five!" he said one officer shouted when he learned that Hemmatipour's student visa had expired and he could be deported.The police promptly dropped the jaywalking charge and turned him over to the Immigration and Naturalization Service.

Yesterday, after spending four days in jail and having to sell his television set and stereo and borrow money from a friend to raise $1,500 bond set by immigration officials, Hemmatipour was found by an immigration judge to be in the United States illegally and ordered to depart by Dec. 19. He thus becomes the first Iranian in the Washington area to be caught in the dragnet of INS officials eager to comply the President Carter's crackdown on Iranian whose visas may be out of order.

For Hemmatipour, his forced and unexpectedly early departure -- which was caused by his allowing his student visa to lapse on the mistaken assumption it was valid until the end of this school year -- means he must leave school 15 months before receiving his degree in respiratory therapy. The speed with which he was caught and ordered to leave has left him stunned and angry.

"I have nothing to do with those people there in Tehran [who are holding American hostages in the U.S. Embassy]," he said yesterday after his hearing. "I don't know them. I don't want to know them. But I don't like it when people [here] hate you just because of how your face looks."

Now, he says, the four years of sacrifice by his mother and sister -- his father died when he was 12 -- who supported him here by sending him every spare dollar they could find, may go for naught.

"I don't want to go home with an empty hand," he said. "There are thousands like me there. Thousands. No good education so they can't get good jobs. Now I don't know what I will do."

Hemmatipour, 24, who has a dark complexion and a thick black beard -- "I look Iranian," he said -- came to the United States in 1975 when he was 19 and had been rejected for admission to the University of Tehran.

"There was a man there who found schools for Iranian students to go to in the United States," Hemmatipour said. "He got paid by the students and by the universities [here]. I asked him to find me the cheapest place."

He ended up being accepted by a Florida school. But when he arrived he discovered it was too expensive so he switched to the old Washington Technical Institute -- now part of the University of the District of Columbia.

He struggled to learn English and carry a full course load. Eventually he transferred to Norfolk (Va.) State College. There, in the fall of 1978, he learned that a close cousin had been killed in the escalating violence that subsequently erupted into revolution in Iran. He withdrew from school and started to head for home, convinced he would have to give up his dreams of an education because he would have to support his cousin's family.

Just as he was about to leave from Washington, his mother managed to reach him. It was much too dangerous in Iran, she said, and she urged him to stay here and continue his studies.

When he tried to re-enter Norfolk State he was told it was too late, so for the next seven or eight months he lived with friends here in Washington and prepared to return to school at the University of the District of Columbia.

"It was very difficult," he said. "I could not work [It is forbidden by immigration regulations]. I could only wait and live off what my family sent me."

Finally, in August of this year, he was able to return to university and resume his education.

In June, he lost his visa. He had placed it in his shirt pocket and then forgotten about it. When the shirt came back from the laundry, the visa was destroyed.

Hemmatipour was unconcerned. He recalled that his previous visa had expired at the end of the school year and he assumed the destroyed one did, too. But he was mistaken. It expired in September.

So the evening of Nov. 12 -- two days after President Carter announced the crackdown on Iranian aliens -- a friend came over to visit him in his Connecticut Avenue apartment.

"He didn't want what I had in the refrigerator," Hemmatipour recalled. "He wanted skishkabobs. So I go over to the market nearby and buy some hamburger and tomatoes. I was on my way back when the policeman stopped me."

Hemmatipour said he plans to appeal the order requiring him to leave the country.

"The kind of things they have done to me, if they had happened to somebody from here in my country I would be mad. I feel angry. I feel that I have paid for [the taking of the hostages] when I have done nothing."