Image copyright Metropolitan Transportation Authority Image caption The grazing goats gave police and train staff the runaround

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.

Skip Twitter post by @that_darn Kudos to Jon & Tracey Stewart for taking care of the goats! Kudos to the goats for what may likely have been an escape from a nearby slaughterhouse! Kudos to MTA for goats' safe capture! Kudos to Brooklyn for miraculously having enough grass for the goats to snack on! — ThatDarnShrink (@that_darn) August 21, 2018 Report

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

Skip Twitter post by @NY1 Update: Jon Stewart, the 🐐 herder? The former host of the @TheDailyShow, seen on the left, helped get 2 goats to an animal shelter upstate Monday. The goats traveled along the N line tracks in #Brooklyn in the afternoon. It's not clear how they got there. Video: Farm Sanctuary. pic.twitter.com/iUur2H8a6g — Spectrum News NY1 (@NY1) August 21, 2018 Report

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.

You may also like: