Firefighters in Prince George’s County made an unusual rescue on Thursday after two pygmy goats got loose in traffic. (Prince George's County Fire/EMS Department)

The goats were found wandering on the roadway in front of Frederick Douglas High School in the 8000 block of Croom Road, near Upper Marlboro, where cars were swerving to avoid hitting them, officials said.

When firefighters arrived, they saw two people trying in vain to gather the two goats, who eluded their captors by fanning out across the roadway and in front of oncoming traffic.

“There were several attempts to capture the small goats, as they kept running in fear from the crew members,” said Lieutenant Lisa Viars in a news release.

Viars said that her crew’s primary objective was to keep drivers and pedestrians in the area safe, and Croom Road was shut down to traffic during the rescue.

Crew members managed to wrangle one of the goats and move it to the bed of their utility truck.

But while they tried to catch the second goat, the first one “daringly leapt from the utility truck, crying (bahhing) for its sibling,” according to the news release.

A road crew working on the shoulder near the high school joined in the rescue attempt. Along with passersby and the firefighters, they were able to herd the goats into a small area and finally capture the animals.

“It is clear in this situation that if firefighters had not intervened there could have been tragic accident,” according to the news release.

The goats snooze in a bookcase at the Croom fire station. (Prince George's County Fire/EMS Department)

One of the goats has a sticker with the number “574” on its head; that number will serve as the goat’s name for the time being. Crew members dubbed the other goat “845,” after the Croom fire station number.

Anyone with information about the ownership of the pygmy goats call 301-883-7745 or 443-404-9375.