A distraught NYU medical student hanged herself inside a dorm, according to police sources Tuesday.

The body of Andrea Liu, 26, was found hanging by a rope inside Vilcek Hall at 334 E. 26th St. — an NYU-owned dorm — just before 11 a.m. Tuesday, sources said.

Police believe it was a suicide and say Liu left a note, according to sources.

Liu was a fourth-year radiology student set to graduate this year, according to friend and classmate Jing Ye, who knew her for four years.

Ye called Liu a “very loyal friend” and recalled how she brought her to her parent’s house for Thanksgiving last year because Ye couldn’t travel home to Canada for the holiday.

“She’s been there for me through everything,” Ye told The Post, choking back tears.

Liu did not show any signs she was stressed when they last saw one another at a fundraiser for the school’s free clinic last month, Ye said.

“She was fine at that time,” Ye said.

Liu’s death comes less than two months after an 18-year-old NYU freshman killed himself in his Stuytown apartment.

“Counseling services are being offered to students, faculty, and staff. At this time of sudden loss and grief, we extend our deepest condolences to the student’s family, friends, and fellow students,” NYU said in a statement.

A suicide wave gripped Columbia University in late 2016 and early 2017, with five students there taking their own lives over a five-month span starting in September 2016.