Reported major crimes in the District of Columbia increased 2 percent in May compared with the same month last year, city oficials reported yesterday.

But they also said that the number of reported crimes increased by 18 percent for the 12-month period ending in May, compared with the previous year.

Mayor Marion Barry and police officials said they were encouraged by the relatively small increase in May since the monthly rate of increase for major crimes, including homicide, rape, aggravated assault, robbery, burglary, larceny and auto theft, for the first four months of this year has averaged 20 percent.

"We are pleased that this upward spiral has leveled off abruptly," Barry said. However, the mayor added, "Neither the chief not I are satisfied with these crime levels.

"This is a good beginning," Barry said. "We are gong to work hard as we can to make our city safe."

According to the monthly crime figures, homicides increased 18 percent from 17 in May a year ago to 20 in May 1980. The number of robberies jumped 11 percent from 591 to 654, and larcenies rose 4 percent from 2,419 to 2,507.

The number of rapes decreased 29 percent, from 31 in May a year ago to 22 in May 1980, while aggravated assault declined 2 percent from 281 to 275, burglaries dropped 1 percent from 1,262 to 1,247 and auto thefts decreased by 4 percent, from 332 to 319.

D.C. Police Chief Burtell M. Jefferson, who is retiring June 30, said, "The overall effort is beginning to pay off." He praised police officers and Barry's 13-point crime prevention plan initiated in February.

D.C. Police Chief-designate Maurice T. Turner said many programs in the plan, which calls for greater participation by the community in crime prevention, increased lighting in high crime areas and changes in police patrols, are beginning to show some success.

As part of the plan, Barry and the police urged D.C. residents to surrender their unregistered handguns to police. Turner said 79 unregistered handguns have been surrendered.

Although Barry and police officials credited the crime prevention plan for the declining rate of increase in crime for May, the mayor cautioned that the figures should not be used as "a barometer of success of failure" of the 13-point plan. He said he expects the monthly crime statistics "to go up and down. We never will be a complete success until we rid the city of all crime."