Mehmet Ali Agca did not resist arrest on Friday when police knocked on his Istanbul apartment door following the court's ruling.
He was returned to Kartal prison in Istanbul just eight days after being released. He is expected to serve several more years.
The panel of appeals court judges overturned a lower court's ruling that set Agca free. He had served 19 years in an Italian prison for the 1981 attack on the pope and then another 5½ years of a 10-year sentence in Turkey for murdering Turkish journalist Abdi Ipekci in 1979.
No 'legal basis'
In ordering his release, the lower court counted the time served in Italy and said Agca had fulfilled his sentence, outraging many Turks. Justice Minister Cemil Cicek asked the court to review the case, and the judges ruled unanimously on Friday that Agca go back to prison and serve more time.
"There is no legal basis to deduct Agca's time in Italy from his prison terms he received in Turkey," the court said.
"The media won, the law lost"
Mustafa Demirbag, Agca's lawyer
Before being taken back to prison, Agca was brought to police headquarters yelling in English, Turkish and Italian. "I declare myself Messiah. I am not the son of God, I am Messiah," shouted Agca.
Earlier, Agca's lawyer, Mustafa Demirbag, said: "We're respectful of all decisions by Turkish courts. The media won, the law lost."
A local prosecutor was to decide on how many more years Agca should serve. Reports have suggested he could be imprisoned until 2014.
Cicek had argued that Agca should serve a full 10-year sentence for killing Ipekci. He suggested the sentence should be counted from June 14, 2000, when Agca was extradited to Turkey from Italy.
Agca has also been convicted in a soda factory robbery and for stealing a vehicle in 1979, and could be ordered to serve an additional four years for each of those crimes.
Agca initially was sentenced to death for Ipekci's murder, but a 1991 amnesty commuted that sentence to 10 years. In 2000, a court convicted him of the other crimes and sentenced him to 36 years. Another court then ruled he could not serve more than 36 years, which is considered as life in prison, in total for all his crimes.
Pope John Paul II (R) forgave
his attacker in 1983
A second amnesty in 2000 deducted 10 years from his time, but the appeals court Friday ruled that deduction was invalid.The pope visited and forgave him in his prison cell in Rome in 1983.
Pope John Paul was wounded in the abdomen, left hand and right arm, but recovered because the bullets had missed vital organs. Agca had fired on John Paul as he rode in an open car in St. Peter's Square.
Rev. Robert Necek, spokesman for Krakow Archbishop Stanislaw Dziwisz, who was John Paul II's personal secretary for over 40 years until the pope's death in April said: "The case is fully in the hands of the Turkish justice system."