An international student at University of Central Florida, who owned high-powered rifles and alarmed police with his “disturbing behavior,” is being deported to China after a judge found him to be out of compliance with his visa, officials said.

Wenliang Sun, 26, came to the attention of UCF Police after university staff reported a “dramatic change” in his appearance and behavior — including spending nearly $70,000 cash on a new car “out of the blue” — the university said in a news release.

Officials acknowledged Thursday that Sun never made threats against the university or student body. Instead, police became concerned after noticing several “red flags” about his behavior, UCFPD Chief Richard Beary said.

“That’s the interesting thing in this case — there were no specific threats,” Beary said. “It may not be any one thing, but when you start adding pieces together, there is cause for concern.”

Police began investigating Sun in early February after he made “unusual statements” to a school counselor, according to a police report. Because medical and mental health information is confidential, authorities would not elaborate on the nature of the statements.

A detective interviewed Sun on Feb. 2, and Sun confirmed that he owned an assault-style rifle and ammunition, which he kept in a storage facility due to guns not being allowed at his off-campus apartment complex, The Verge on Jefferson Commons Circle, police said.

Sun told police that he never took it shooting, saying he only liked to “play with it and look at it,” according to a police report.

Detectives then asked Sun about the new Chevrolet Corvette he bought with $68,000 cash. Sun told them, “In my country, that is a cheap car,” according to a police report. Text messages released by UCFPD indicated Sun’s father provided the money for the car.

The detective also noticed that Sun had dyed his hair blond.

“If you go back to some of the shooting incidents across the country, we know that people often change their appearance,” Beary said. “On its own, dying your hair is not a big deal, but when we add it together with all of the other things we’ve seen — another big red flag.”

When asked whether he wanted to harm himself or anybody else, Sun said no, but police were concerned that he referred to his weapon as a “sniper rifle” instead of a “hunting rifle,” Beary said.

Days after the interview, he bought a second gun: a .308 caliber rifle, along with a bipod and expensive optics, Beary said. He used that gun for target practice at Machine Gun America.

UCF Police had already contacted the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives, as well as federal customs and homeland security officials, who began investigating, officials said.

Both guns were purchased legally, as federal law allows non-immigrant visa holders to own firearms if they also carry a hunting license, which Sun did. He had been participating in an academic and cultural program for international students at UCF.

Sun’s non-immigrant status was later revoked due to an issue unrelated to his gun purchases: He was not attending classes but was required to do so in order to maintain his visa, officials said.

Once his status was revoked, owning the guns became illegal, the university said. Sun was taken into custody Feb. 7 by federal agents for violating the terms of his admission to the country and potential violations of federal firearms laws, according to the statement.

Immigration officials said the proceedings wouldn’t have happened so quickly had Sun not bought the weapons and acted strangely.

“Under normal circumstances, it probably would not have moved that quickly,” said Tim Dwyer, an official with the Department of Homeland Security. “He probably would’ve been placed on notice, and we would have issued him a notice to appear, indicating that he would need to go before an immigration judge and deal with his status — or lack thereof.”

Although Sun never made specific threats, Beary said that his detention might have saved lives. “Some of the [investigators] with a lot of years of experience … walked away and said, ‘we just saved a bunch of lives,’ ” Beary said. “There’s no doubt about it.”

An immigration judge on March 21 ordered that Sun be sent back to China. He may not return to the United States for at least 10 years, officials said.

Despite the fact that Sun is only accused of violating the terms of his visa, immigration lawyer Henry Lim said that’s all the government needs to begin deportation.

“As soon as they pull out of compliance, the government is within its right to begin deportation proceedings,” Lim said.

Lim added he was curious about whether the government gave Sun the chance to voluntarily leave before ordering his deportation. A voluntary departure would have allowed Sun to return within 10 years.

According to a U.S. Immigration and Customs Enforcement database, Sun was being held Thursday in the Baker County Detention Center in Macclenny, a city in North Florida.

His detention comes just weeks after another UCF student was barred from owning guns due to legislation passed after the tragedy at Marjory Stoneman Douglas High School.

Chris Velasquez, 21, told police he was one life-altering event away from shooting up an Orlando school, according to court records. Orlando Police used the newly created “risk protection order” to temporarily prohibit him from possessing guns.