A male baboon and his “two wives” ran wild in Australia on Tuesday after escaping from a medical facility where he was set to undergo a vasectomy, a health official said.

The trio got loose while being transported to the Royal Prince Alfred Hospital in Sydney and toured the parking lot, where surprised bystanders recorded the encounter on video.

VILLAGERS IN INDIA DRESS UP AS BEARS TO SCARE OFF MORE THAN 2,000 MONKEYS

New South Wales Police said the baboons “were going bananas,” before adding that police and wildlife officials had the situation under control and there was no immediate danger to the public.

NSW Health Minister Brad Hazzard told local news outlets the 15-year-old male had been transported to the facility for a vasectomy, and not for research purposes.

"They don’t want him to continue breeding with the small troupe he’s in, so in order for him to stay the decision was taken that he should have a vasectomy," Hazzard told the Sydney Morning Herald. "The two females were there just to keep him calm."

Hazard told the Daily Telegraph the male would have the vasectomy on Wednesday before returning with his “two wives” to their colony, where he can “stay forever with them” without making babies.

The baboons were from a colony that has been used for medical research in “a whole range of areas,” including reproductive issues, kidney disease and gestational diabetes, he told the outlet. He emphasized that when the research is completed, the baboons are returned to the colony.

INDIA FARMER PAINTS DOG TO LOOK LIKE TOGER TO PROTECT COFFEE CROP FROM MONKEYS: REPORT

The three baboon escapees have since been captured unharmed after handlers from the Taronga Zoo tranquilized them, Hazard told Australia’s 7 News, but not before sparking a frenzy on social media.

Hazard told the Morning Herald that even he was stunned to see baboons on the loose in Sydney.

CLICK HERE FOR THE FOX NEWS APP

"I thought I had seen just about everything as health minister in NSW, but a baboon threesome enjoying the grounds of Royal Prince Alfred is really surprising," he said.