Mars Avelino said he decided to register to vote in the District at the last minute yesterday because he was concerned that President Reagan might need his support.

"I'm for Reagan, and it looks from the debate like it the race is a little close," said Avelino, a bookkeeper for a private firm. "He's getting old and of course the time of the night when the debate with Democrat Walter F. Mondale was held wore him down. But I know he's a very competent man."

Avelino was among about 2,000 D.C. residents who flocked to the District Building to beat yesterday's deadline for registering to vote in the Nov. 6 presidential election.

The voter registration office was jammed throughout the day and applicants were still hurrying to fill out applications as elections officials closed down for the day.

"It was like a mob," said a D.C. police officer who guarded the area. "I was going to call in for reinforcements . . . Why do people wait four years to register?"

Joe Baxter, the D.C. voter registrar, said his office has had "an incredible turnout" during the past week, including 500 to 600 registration forms in the mail each day.

Baxter said he doubts the number of new voters will approach the total of 31,000 who registered before the May 1 presidential primary. But of yesterday's rush, he said: "We've had more people in the office today than I've ever seen."

Hundreds more who picked up voter registration forms at D.C. public libraries had until midnight to mail them to the elections board to qualify.

Monday was the deadline for Maryland residents to register to vote, while the registration rolls were closed in Virginia last Saturday.

While many of the people who waited in line said they had seen the televised presidential debate Sunday night, few said it was a factor in their decision to register at the last minute.

"I wasn't all that motivated by the debate," said Chauncey Smith, an employe with the D.C. Department of Finance and Revenue. "I just think it's one's civic duty."

"Guilt was the factor," said Vicki Roney, a systems engineer, in explaining why she decided to register just before the deadline. "I felt guilty."

Mary Ann Ek, an accountant, had been traveling in India and returned "It was like a mob. I was going to call in for reinforcements . . . . Why do people wait four years to register?" A D.C. police officer to Washington just in time to register. "Right now I'm sleeping off jet lag," she said.

A federal government employe explained that "I always do things at the last minute," while a young woman who declined to give her name said she decided to change her registration from Republican to Democratic because of dissatisfaction with the current administration.

"I wouldn't want Reagan in to save my life," she said.

A handful of stragglers complained that the voter registration office closed 15 minutes before the 5 p.m. deadline that had been posted outside the office.

"I specifically called the office and they said they were open until 5 p.m.," said Rose Kobylinski, who works in an import shop. "I'm so mad. I even took off time from work to come."

Edward Norton, chairman of the D.C. Board of Elections and Ethics, said the latecomers were given application forms that they could send in by mail.

"We're not going to get hung up on 15 minutes," Norton said.