Six men had been detained on suspicion from the Pathankot railway station, Punjab Police officials said on Monday.
They were on board the Pooja Express from Jammu to Ajmer in Rajasthan, when security forces stopped the train in Pathankot late on Sunday and took them in custody.
Punjab Police and their Jammu and Kashmir counterparts have been interrogating them along with other security officials.
Security agencies suspect that the detained were planning to carry out terror activities in Delhi or someplace else, a police officer said, adding that some weapons, explosives and a motorcycle had been recovered from them. More details were awaited.
Security agencies are on alert in frontier districts of Pathankot and Gurdaspur as terrorists have targeted these in the past.
The Pathankot airbase of the Indian Air Force (IAF) was attacked by terrorists, suspected to be from Pakistan, on January 2, 2016. Seven people were killed in the attack.
The area has defence establishments, including the frontier IAF base in Pathankot and the nearby Mamun Cantt of the Army.
Prior to the terrorist attack on the IAF base in 2016, suspected Pakistani terrorists had carried out an attack on Dinanagar town in Gurdaspur district.
The Dinanagar terror attack took place on July 27, 2015 when three Pakistani terrorists entered from the border belt. Six people, including the three terrorists, were killed in the attack.