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.
More From This Section
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'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.