A group or individual claiming to be part of the Islamic State militant group hacked the website of one of China's top universities, which is involved in defence and national security research projects, late Sunday.

The Tsinghua University website, which was used by teachers and students, showed men in hoods with an audio playing in the background. The visual also had a quote saying: "Everything is OK in the end. If it's not OK, then it's not the end," a quote popularly attributed to John Lennon.

CCTV said other messages in support of Jihad on the hacked site read: "Allah is great. I don't fear death. Sacrifice is my ultimate goal."

The message was signed "Islamic State Hacker", reported South China Morning Post (SCMP).

The university, which is believed to be one of the pioneers of information technology in the country, has a powerful cybersecurity setup.

"The website might have used a relatively weak password, which compromised its security. It is unlikely that Islamic State hackers had acquired the advanced technology to break Tsinghua's firewall," said a technician on the investigating team, according to SCMP, which was citing Beijing's Legal Evening News.

What is now being considered the first attack by Isis on a Chinese website has been confirmed by a member of the computer management team as having taken place. However, no further details were furnished by them. 

The website was shut down while the homepage of the university and other unaffected sites remained online.

The jidadi militia had last year listed China among 18 states it considers enemies.