Morena Baccarin just won big in her custody hearing ... and now her kid will be shacking up with her in NYC.
A judge made the ruling in LA on Thursday -- Baccarin's one-year-old son she had with estranged husband Austin Chick will mainly live in NY with his mom. However, the couple will split joint custody.
Baccarin's attorney Samantha Spector tells TMZ ... Chick will still be able to visit his son once a month for 8 days, but he has to give a 15-day-notice before making a trip.
Chick will be able to bring his son back to LA every two months for an 8 day visit. We're told Baccarin will have to foot the travel expenses, but only has to pay for coach seats, no first class.
TMZ broke the story ... Morena's one-year-old will have a sibling soon, she's pregnant with "Gotham" co-star Ben McKenzie's child.