It's called the 'Noah's Ark' bill.

New York State Assemblymember Linda B. Rosenthal learned that during Hurricane Sandy in 2012, some residents stayed put in locations prone to flooding because they weren't allowed to take their pets on public transportation.

So she proposed legislation to make sure that such a situation doesn't happen again, Gothamist reports.

And her "Noah's Ark" bill succeeded. Gov. Andrew Cuomo has signed the legislation into law, and it will go into effect in a month.

State of Politics reports that during emergencies, pets will be allowed to travel via Metropolitan Transportation Authority "as long as there is also space for people to be on board first."

Media outlets quoted Rosenthal saying no one should have to leave a pet behind during a disaster.

"This law will ensure that all New Yorkers – both two- and four-legged – can escape to safety on public transportation," she said.

Previously, pets were only allowed on New York's subway if they were "enclosed in a container," according to Gothamist.

Read more at Gothamist