The Maryland racing stewards, after consultation with Assistant Attorney General Allen Foreman and track security chief William Ramsey, today ordered the redistribution of the purses in races involving the horses Sun Dandy and Dr. Peatoppy.

The purses of the three races in which Dr. Peatoppy, running under the name of Sun Dandy, finished third once and won twice, will be redistributed to those horses who finished directly behind him.

Today's ruling releases Dr. Peatoppy and Sun Dandy from the barred list, where they were placed by the stewards on March 31, after the discovery of the switch. They now may be entered in races.

The stewards had to notify the owners and get their consent not to take legal action before making their ruling.

The disqualifications have cost the owners, Joseph Palladino of Essex, N.H., and John T. Flynn of Saugus, Mass., nearly $6,000 in purses. Parimutuel payoffs remained the same.

Stewards said the investigation--which has not been completed--confirmed that Dr. Peatoppy, who had run well in $12,000 claiming races at the Meadowlands in November, raced under the name of Sun Dandy in three $4,000 claimers in Maryland at Bowie and Pimlico.

Raymond Stifano, who trains both Dr. Peatoppy and Sun Dandy, has acknowledged that he inadvertently mixed up the identities of the two different colored horses when they arrived at his Bowie barn in early February. Stifano said the name tags on the horses' bridles were wrong.

James Rowan, the man responsible for the proper identification of horses when they arrive at the saddling enclosure, has been relieved of his duties as horse identifier and has been reassigned to other duties until the investigation is completed by the track security chief.

Sources said the remaining issues of the investigation include confirming that the switch was inadvertent, and determining whether other undetected switches occurred that involved horsemen unrelated to the Dr. Peatoppy-Sun Dandy affair.

The Maryland Racing Commission will meet Friday in Baltimore, but James Callahan, secretary of the commission, said the Dr. Peatoppy-Sun Dandy matter will not be on the agenda.