District and federal police told protesting farmers from the American Agriculture Movement yesterday that they must remove most of the more than 400 tractors and farm vehicles on the Mall by midnight tonight, when their demonstration permit expires.

Faced with that ultimatum, the first since the farmers came to town, farm leaders held a hurried meeting yesterday afternoon with a top aide to Mayor Marion Barry saying that if they were allowed to make one more tractorcade today their three-week protest could probably end.

"I think we will have accomplished what we want. I don't see any need for any further tractorcades," said protest leader Tommy Kersey of Unadilla, Ga. "It could possibly be the end of the tractorcades."

Last night, the farmers told officials of the D.C., Capitol and U.S. Park police departments that if one more tractor parade is permitted -- past the Federal Reserve Board building on Constitution Avenue at 20th Street -- the tractors that participate will be the first to leave the Mall permanently for a new encampment police have offered at Robert F. Kennedy Stadium.

The decision whether to permit the tractorcade probably will be made today after the farmers meet with police officials and D.C. Mayor Marion Barry.

Kersey said he thinks his fellow farmers will leave the Mall "less begrudgingly if we are allowed to have that tractorcade."

The farmers, whose tractorcades through the city have often snarled rush-hour traffic since their arrival Feb. 5, have been under mounting pressure to leave the Mall. Police had barricaded the protesters there on the day of their first violence-marred protest after several clashes with the farmers that led to the arrest of 19 protesters.

D.C. police later agreed to allow tractorcades around the District, but in almost every parade, the farmers managed to foul the District's traffic, angering commuters and frustrating police.

Late yesterday about 200 of the farmers met in a church near the Capitol to hear their leaders tell them of the police order. But even before their gathering there were signs on the muddy, rutted Mall that some farmers were ready to quit the city.

"It's time to leave," said Marvin Urbanczk yesterday afternoon as he loaded his tractor on a trailer for his return to White Deer, Tex.

But others, among them spokesman Kersey, were anxious to leave without a loss of face. "We're not going to leave with a defeatist attitude," he said. "We want to leave here with dignity. We don't want to leave here whipped."

Deputy D.C. Police Chief Robert W. Klotz denied that "an ultimatum" had been given the farmers. But, Klotz said, farm leaders had been told that after midnight, only 50 vehicles would be allowed as a symbol of the protest in the Mall area.

The remainder would have to be moved to the parking lot of RFK Stadium, Klotz said. They could remain there three weeks before parking charges would be assessed, he said.

Klotz held out the prospect that police will give the farmers an extra day or two to clear the Mall if the farmers cooperate.

Kersey, farmer Russell Greider of Portales, N.M., and lawyer Norman G. Kurkland met for half an hour yesterday with Ivanhoe Donaldson, general assistant to Barry, to ask that the ban on tractorcades imposed by D.C. police Monday be lifted to allow one final protest.

Kersey said before the meeting that the appeal was being made to Barry because they felt that the mayor, a former civil rights activist, would be in sympathy with their cause. "We feel if anybody understands, he should," Kersey said.

Kurkland said he sought the meeting with Donaldson based in part on old acquaintance. In 1962, he said, when Donaldson had been arrested in a civil rights demonstration in Clarksdale, Miss., Kurkland, then an investigator for the U.S. Civil Rights Commission, helped get Donaldson out of jail.

"When I knew they [the farmers] were in a box, I called Ivanhoe," Kurkland said. "We believe in the same thing." Kersey said after the meeting that Donaldson had promised to "do his best" to obtain permission for the tractorcade. "It sounds to me like that means he will relly try."

The meeting came amidst continually deteriorating relations between the farm protesters and leaders of the District, U.S. Park and Capitol police.

Police spokesmen said that Monday night a group of farmers began throwing trach at a police mobile command unit parked inside the Mall at Third and Madison streets NW. Later, police said, the protesters tried to hook chains on a truck in the barricade at 12th and Madison.

Police also reported that a group of farmers had used chains Monday night to pry an opening near 14th and Madison in the wall of vehicles surrounding the Mall and let five tractors through. Farmers claimed the police had pulled a truck out of the line as a way of "baiting us." Drivers of the tractors were arrested and their tractors were impounded by police shortly afterward.

Ever since the farmers' arrival, Barry had asked city officials to be as lenient with the farmers as possible, in part because he did not want the protest -- directed at the federal government -- to be aimed at the District Building.

Kersey said yesterday he did not know what impact the latest police order would have on the protesters. "I don't see any sense in taking on the Washington police," he said. I don't see what you gain. We'd lose."