Police arrived on the scene, tranquilized the male goats, and took them to an animal shelter. The shelter contacted Farm Sanctuary.
Two goats on the lam -- Willy and Billy -- are bound for an animal sanctuary after spending a scary two hours on the tracks of the N line in Brooklyn on Monday.
"Two very baaaaad boys," NYC Transit tweeted shortly before 11:30 a.m., along with photo of the two goats scrambling along the above-ground train line.
"A new one for us (we think)," the agency said. "Two goats are roaming along the N line tracks in Brooklyn. They're safe and not currently affecting service, but they are on the run. We'll keep you posted."
Perhaps mercifully, Metropolitan Transportation Authority Chairman Joe Lhota was not consulted on how to handle the fleet-footed creatures, according to an agency official.
In 2013, Lhota's then-mayoral campaign was derailed when two adorable kittens got trapped on the train tracks -- and the Republican candidate said he wouldn't halt the subways to save them.
Those kittens, Arthur and August, were found on a stretch of tracks in Brooklyn near Church Ave. station, and both have since been adopted.
Luckily for the goats -- who don't have nine lives -- they wandered onto tracks where the power had been cut for station rehab work, according to the MTA.
NYPD officers nabbed the goats around 1:10 p.m., NYC Transit Subway said.
"We thank ewe for your patience," the agency wrote.
The goats were waiting in an Animal Care Centers of NYC facility in East New York for rescuers from the Farm Sanctuary in upstate Watkins Glen to pick them up, according to ACC spokeswoman Katy Hansen.
The happy hoofers were named Willy and Billy, according to Hansen.
Train operator John Walters first spotted the goats near the Eighth Ave. station in Sunset Park and called it into the Rail Control Center.
"They didn't believe it either. They said 'goats as in G-O-A-T-S?'" Walters said. "I said, 'Yes, ... two goats. And I'm fit for duty.'"
Walters, 38, said the goats appeared more terrified of the train than he was of them. The spry animals were running into the retaining wall in a failed attempt to climb out of the tracks.
"We've seen people, shopping carts, chickens, dogs, cats, but two goats?" he said. "This takes the cake."
After they calmed down, the goats ambled south to the Fort Hamilton Parkway station and then on to the New Utrecht Ave. stop in Borough Park, munching grass along the way, an official said.
The MTA ran southbound N trains over the D line from 36th St. to Coney Island-Stillwell Ave. while NYPD cops and animal control workers corralled the kids.
Passengers whose train trips were disrupted told the Daily News they were unaware escaped goats were to blame.
"They just said police activity, they didn't say goats," Hilton Williams, 47, said.
NYPD Emergency Service Unit officers tranquilized and hog-tied the goats before carrying them out on animal catch poles.
They were a handful to catch, jumping around even after they were hit with the tranquilizers, officials said.
"I saw them in the tracks, I saw them jumping the rails, they almost got shocked," said an MTA contractor who declined to give his name. "We ... (were almost) going to get goat stew today."
The contractor said he suspects Willy and Billy came from a nearby live poultry store, La Pera Bros., that has a sign out front that says, "Live Goats & Lambs."
Workers came out to close the shop's gates as curious reporters approached. They denied having goats on the premises.