A madrassa student, hailing from Karnataka, was detained for questioning by a team of the National Investigation Agency on Sunday for suspected terror links.
The student, Farukh, was staying at a madrassa in Deoband of Saharanpur, police sources said.
The student was let off after eight hours of questioning.
Senior Superintendent of Police Vipin Tada confirmed Farukh's detention.
According to the sources, Farukh is adept in many languages and was allegedly in touch with a module of the Pakistani intelligence unit ISI via a social media app.
Darul Uloom Deoband's chief Abdul Kasim Nomani said that in the evening, Farukh was handed over to the authorities of Darul Uloom Deoband.
On June 23, a Rohingya student, Mujibullah, was arrested from Deoband.