For many New Yorkers, a Monday morning subway commute is an experience they'd be delighted to avoid.

But it appears nobody's told the city's goats.

Two of the greedy herbivores briefly disrupted the N line from mid-morning on Monday, when they were spotted roaming the tracks in Brooklyn.

The pair were apparently captured with the help of US comedian Jon Stewart and his wife Tracey, who transported them to a nearby animal shelter.

Stewart, the former host of The Daily Show, is a long-standing animal welfare activist. He and his wife are supporters of the Farm Sanctuary shelter in upstate New York where the rogue goats were taken in, and have previously adopted an abused horse and a bull that escaped from a slaughterhouse.

They also opened a sanctuary at their own New Jersey farm in 2015.

The Metropolitan Transportation Authority (MTA), which runs the New York Subway, said it had called the police and Animal Control about the goats, which were spotted on the tracks between the Fort Hamilton and New Utrecht stations.

"We're told they were munching grass," said Jon Weinstein, a spokesman for the MTA.

Train staff and police managed to corral the white-and-brown runaways on to a closed track before they were tranquilised and captured at around 13:00 local time (17:00 GMT), the MTA said.

The New York City subway's social media account saw the funny side and tweeted that goats were "Two very baaaaad boys", alongside a picture.

Social media users posted their own reactions to the story.

Video shared on social media shows Jon Stewart mid goat-rescue, helping the animals into a truck.

It's unclear how the goats came to be on the tracks, although there are a number of slaughterhouses in the area that animals have escaped from in the past.

The pair were of the Boer breed, which is commonly raised for its meat, Meredith Turner-Smith of the Farm Sanctuary shelter said.

If they did indeed mount a daring escape, it appears the goats - which are both males - can look forward to a brighter future with other rescued farm animals. They have now been named Billy and Willy by the shelter which will be their new home.