Five Miami policemen were shot and motorists were bloodied by rock- and bottle-throwing crowds during disturbances today in Liberty City. Hundreds of police officers cordoned off of a nine-square-mile area of the neighborhood scarred by riots two months ago.

Sniper fire punctuated the evening hours as some Liberty City residents fled the area.

By dusk, buses had been rerouted around the area after several buses were hit by rocks. Police officers fired tear gas at several, locations to disperse threatening crowds.

Twenty persons were injured and about a dozen youths were arrested in the disorders that began this afternoon and continued until after midnight.

One man was stabbed as he stepped off a bus and another pedestrian was shot in the leg from a passing car. Several persons were injured by flying glass. Five police officers, in addition to the five hit by gunfire, were reported slightly hurt by thrown objects. Only one of the 10 police officers required hospitalization.

Some businesses were reported looted and at least one service station was burned Firemen who attempted to put out the fire were pelted with rocks and bottles, officials said. Six juveniles were reported arrested for damaging cars.

Two black community activists toured the sealed-off area Wednesday morning and reported hearing sniper fire. "There is a hell of a lot of shooting going on out there," said Preston Marshall, a professor at Florida International University, and an official observer of the area for the Miami Community Relations Board.

"I heard 30-40-50 rounds while walking through the project within the last half an hour. And the police were shooting back."

He added that several hundred youths between the ages of "10 and 14 were sitting on stoops with rocks, bottles, gasoline and matches."

The top police officer in the area, however, described the situation as one of "sporatic gunfire," and predicted that the barricades would be removed Wednesday morning, although no whites would be allowed to drive through the area in cars because "they contributed to our problems" in the May riots.

About 3.30 p.m., police Sgt. Fred Pelny was shot in the back but not seriously wounded while trying to stop an apparent holdup attempt. It was the spark that ignited disturbances as police attempted to disperse crowds heaving rocks and bottles. Police Sgt. Rodney Watson was superficially wounded by a sniper's bullet as he patrolled in the area later in the evening Then, about 10:30 p.m., police reported that three more officers had suffered superficial gunshot wounds and were being treated at Jackson Memorial Hospital.

About 500 specially mobilized police were assigned to man check points at key intersections in Liberty City through the night, turning motorists away from the troubled area.

At about 8:47 p.m. sniper bullets shattered the windows of the patrol car in which Watson was riding through Liberty City, grazing his left shoulder. He was treated at Hialeah Hospital and released.

About an hour later, a sniper, armed with what police believed was a shotgun, sprayed pellets into another police cruiser patrolling about a mile south of where Watson was shot. The three policemen inside sustained minor injuries in that incident, police said.

"They're shooting at anything and everything that moves," said Metro officer Roger Blyesdale.

A Hialeah Hospital spokesman said Watson was treated and released at 10:35 p.m.

Public officials warned of rising tensions after Metro police swarmed into the James E. Scott Homes housing project earlier in the day searching for gunmen who shot Pelny, 39, during the robbery attempt.

Black staff members of the James E. Scott Community Association, an antipoverty agency, roamed through black neighborhoods attempting to calm the situation.

The May riots in a more extensive area of the same neighborhood took the lives of 18 people and caused an estimated $100 million in damages. Authorities said the disorders today did not involve the same widespread arson as in May.

Dade County Manager Merrett Stierheim blamed the violence on "two or three groups of young people that are roaming Liberty City." Police had no estimates of the number of persons involved in the disturbances.

The injured included Jose Brandariz, 51, who was stabbed in the back as he got off a bus. He was hospitalized at Jackson along with an unidentified man who was shot in the leg by gunmen in a passing car.

Pelny, the officer first wounded, was shot as he and Officer Les Blumen, 35, tried to break up an apparent street robbery outside housing project. Pelny was in good condition at Jackson Hospital where doctors said a small-caliber bullet had lodged beneath the skin of his back.

The wounded officer and his partner had been on a stakeout as part of a special unit assigned to suppress muggings near the project. According to a police account, Pelny and Blumen went to the aid of a driver who had been stopped by two men in an apparent holdup.

The white driver of a car was fighting off three blacks who had grabbed something from his car. When Pelny, Blumen and a third officer, Michael Cummings, 32, rushed to his aid, the victim was able to drive away.

But during the scuffle, a jeering crowd of 20 to 30 bystanders began throwing rocks and bottles at the officers. "We chased them [the suspects] into the project area," Pelny said. "They fought us. They started hollering to the crowd, and the crowd started coming. They started shooting at us."