Charlie the carriage horse’s last days pulling happy tourists through Central Park were filled with pain from a stomach ulcer that might have caused him to collapse and die on the street, ASPCA officials said yesterday.

Charlie “was not a healthy horse” and was probably in pain during the few weeks he worked as a carriage horse, said the ASPCA, which performed the “gross necropsy” at the Cornell University College of Veterinary Medicine.

The preliminary findings determined that the horse had a stomach ulcer and a cracked tooth.

“We are very concerned that Charlie was forced to work in spite of painful maladies,” said Dr. Pamela Corey of the ASPCA.

The official cause of Charlie’s death will not be known until microscopic analysis of tissue.

Charlie’s death on Oct. 23, at Eighth Avenue and 54th Street as he headed toward Central Park, triggered outrage from animal lovers.

But Mayor Bloomberg said again yesterday that carriage horses are well treated.

“We are very careful to make sure that they’re well taken care of,” he said. “If you see them on the streets, they are in great shape, and I don’t know what makes a horse happy or not.”

Bloomberg sparked anger shortly after Charlie’s death when he said of carriage horses, “Most of them wouldn’t have been alive if they didn’t have a job.”

He said the carriage horses were “part of New York’s heritage . . . that tourists love.”

The ASPCA said Charlie was licensed for carriage horse work in August. It added that the average carriage horse starts work at the age of 10, and some start as early as 5 or 6.

Charlie’s origins remain unclear, but he was believed to be about 15 years old.

Dr. Corey, the director of equine veterinary services of the ASPCA’s humane law-enforcement department, said, “We have observed some horses returning to New York City after furloughs on a farm in worse condition than when they left.”

“We are very concerned that Charlie was forced to work in spite of painful maladies, and these particular health issues can be difficult to diagnose because draft horses are by nature a stoic breed, not displaying signs of pain until they are very severe.”

Bloomberg said Charlie’s death was particularly sad because it happened on the street and several people witnessed his collapse.

But he defended the tourist-oriented industry. “The owners have every interest in having those horses healthy and they do a good job,” he said.

An advocacy group, New Yorkers for Clean, Livable and Safe Streets, called for the city to conduct a probe of the industry.

“Along with an immediate investigation, the Department of Health should require that all carriage horses have complete veterinary exams under guidelines established by the ASPCA, and by veterinarians chosen by the ASPCA,” the group said.