Morena Baccarin and Benjamin McKenzie Morena Baccarin and Benjamin McKenzie

Gotham might be hosting a wedding soon.

Morena Baccarin, who's pregnant with Gotham co-star Benjamin McKenzie's baby, plans to marry the actor after her contentious divorce is finalized, she revealed in court documents obtained by People and TMZ.

"Today, I am in a new committed relationship. I am planning to re-marry. Also, I am 3 1/2 months pregnant," Baccarin wrote in the papers filed Sept. 11 as part of a custody battle with her estranged husband Austin Chick over their 1-year-old son Julius.

Gotham co-stars Benjamin McKenzie and Morena Baccarin are having a baby

Baccarin's pregnancy was revealed on Thursday when a judge ruled that Julius could live with the Homeland alum in New York, where Gotham shoots, since her pregnancy would prevent her from flying across the country.

Chick filed for divorce from Baccarin in June after four years of marriage. Baccarin says she became pregnant with McKenzie's baby shortly after, but in his own legal papers, Chick says the baby was conceived when he and Baccarin were still together, according to TMZ.

Baccarin, 36, and McKenzie, 37, who play love interests on Gotham, had previously never confirmed their relationship, but did attend Emmy after-parties together last Sunday.