Just three months before Barnard College freshman Tessa Majors was murdered in Morningside Park, a Columbia University student was mugged at knifepoint by a trio of youths in the exact same spot, The Post has learned.

Yao Yu, an international student from China studying mathematics, had only been in the U.S. four days when he was robbed on Aug. 27 while walking down the stairs at 116th Street and Morningside Drive.

Yu was walking home from class that afternoon when he was approached by three suspects, one carrying a knife and the other a stick, police said.

“They asked me where I was from and if I had any money. At first, I didn’t think they were threatening me, so I told them I didn’t have any money. Then, they showed me an open knife, so I gave them my wallet and they took my money,” Yu told The Post Friday from his Harlem apartment.

“I was surprised this happened to me. Before I came, I heard that New York is pretty safe, but I encountered these things and it’s really unfortunate.”

When Yu went to the NYPD to report the incident, he was told “several people” had been robbed at the same place “by the same teenagers” but cops couldn’t do much about it because “they aren’t adults.”

“When I heard about the girl who was killed, I thought it was the same group of teenagers, and I was scared,” the student went on, adding he plans to take the campus shuttle from now on.

“I feel very sorry for her.”

The Harlem park has been a hotbed for criminal activity with at least 20 robberies since December of last year, 21 grand larcenies, 10 misdemeanor assaults, two sex crimes and one felony assault inside and on the perimeter of the park, NYPD data shows.

Across the 26th Precinct — which covers Morningside Park, Barnard College and Columbia University — robberies, sex crimes, misdemeanor assaults, burglaries and petty larcenies are all on the rise, the data shows.

Most recently, on Dec. 2 — about two weeks before Majors was murdered — a 25-year-old man walking near 114th Street and Morningside Avenue toward the dog park around 5 p.m. was confronted by a suspect wearing a ski mask and carrying a pocket knife, police said.

The victim pushed the suspect and managed to run away before anything was stolen, cops said.

On Oct. 17, cops arrested two teens — a 16- and a 17-year-old boy — for two back-to-back robberies that happened within minutes of each other in and around the park, police said.

The first incident happened around 8 p.m. on West 113th Street near the entrance to the park when a 24-year-old and 26-year-old were approached by the teens, who flashed a gun and stole a wallet and an Apple Watch, police said.

Fifteen minutes later, the same duo approached another man near the 116th Street entrance to Morningside Park — also steps from where Majors’ body was found — and stole a wallet and a cellphone, police said.

In May, another pair of teen robbers attacked a 28-year-old male and a 31-year-old male in separate incidents within a half hour of each other, police said. In both cases, the victims were beaten up by the kids and lost $200 and $100 in cash, respectively.

Both a 14-year-old and a 17-year-old were arrested and charged with those robberies, cops said.

On April 17, assailants pummeled Bob Lederer, an LGBT and AIDS activist, inside Morningside Park around 115th Street at around 4:30 p.m. leaving him unconscious, police previously said.

A Facebook post from Lederer’s partner said that Lederer spent eight days in the hospital with a traumatic brain injury.