Hamid Nehal Ansari was convicted on Sunday in Kohat, a city in the Khyber Pakhtunkhwa province of Pakistan, and was shifted to Peshawar Central Prison, a jail spokesman said.
He has a right to appeal under the Pakistan Army Act. India had sought consular access for Ansari, an engineer, and asked Pakistan to ensure his safety and security.
According to Dawn, Ansari has confessed to illegally entering Pakistan from Afghanistan for espionage. He had seven Facebook accounts as well as around 30 email addresses.
He was reportedly found to be in possession of sensitive documents, it claimed. Over three years after Ansari went missing in Pakistan where he had allegedly gone to meet a girl he had befriended on the Internet, authorities last month admitted that he has been in army custody and facing a trial in military courts.
In light of the information, a two-member bench had on January 13 disposed off a habeas corpus petition filed by Fauzia Ansari, the convict's mother, against his alleged illegal detention.
Court had asked the government to respond to the petition by Fauzia on the whereabouts of her son. In response, Military Intelligence Directorate intimated that Ansari was in military custody and is being tried by a military court.
Ansari, a Mumbai resident, was taken into custody by police and Intelligence Bureau (IB) officials in Kohat, about 70 kms from here, in November 2012. Ever since, his whereabouts were unknown.
Ansari's mother claimed he was in touch with some Pakistani friends who had suggested him to cross into Pakistan from Afghanistan without a visa. She claimed that he had befriended a Pakistani woman through social media and had gone to Pakistan to meet her.