An endearing photo of a South Carolina math professor holding a student's newborn during class went viral after the baby's mother posted the picture on Facebook, saying the student could even bring the baby to class for as long as she needed.

Josie Ryan, the professor at Lander University in Greenwood, S.C., insisted that the student continue to pursue her degree even though she 'd certainly face new pressures and stress outside of school, CBS News reported.

Months ago, Ryan told the student, Sarah Thompson, that once she delievered, she could bring the baby with her.

“She knew I’d be overwhelmed so literally begged me to bring Isaiah to class, and even showed me where the breastfeeding room in the health canter was,” Thompson posted on Facebook.

Thompson said her baby, Isaiah, has been an “angel” during the class, with the occasional flatulence, which breaks up an otherwise quiet math lesson.

“Hopefully this post will encourage other educators or moms or pregnant/working women who are students to ask for help,” she posted.