A 2-year-old Brooklyn girl was rushed into surgery after falling from a second-story window while her mother was in the bathroom Monday morning, police said.

The girl plunged out a window of the private home on E. 2nd St. near Avenue N in Midwood about 8 a.m., cops said.

Medics rushed the toddler to Maimonides Medical Center in critical condition.

It wasn’t clear how long the child had been unattended while the mother was in the bathroom.