Harvard University has forbidden professors from having a sexual relationship with any undergraduate student.

A panel at the school announced the change in policy following similar moves by Yale University and the University of Connecticut.

"Undergraduates come to college to learn from us," the panel's chair, Alison Johnson, said according to Bloomberg News. "We're not here to have sexual or romantic relationships with them."

The change in policy came after the school conducted a review of its Title IX policy, a spokesperson for Harvard told BuzzFeed News in a statement.

Anna Cowenhoven said the panel determined "the existing language on relationships of unequal status did not explicitly reflect the faculty's expectations of what constituted an appropriate relationship between undergraduate students and faculty members."

"Therefore, the Committee revised the policy to include a clear prohibition to better accord with these expectations," she said.

The ban applies to professors who work for the school's arts and science school, which teaches the majority of undergrads, Bloomberg News reported.

Previously, Harvard had only banned professors from being romantically involved with their own students, according to Bloomberg News.

The school also banned professors in the arts and science school from having a relationship with graduate students they supervise. Graduate students are barred from relationships with undergraduate students that they may have a supervisory role over at some point, according to Bloomberg News.