The 51-year-old victim was singled out and shot from behind several times as he was kneeling in prayer, Blick reported.
The crime was reported at the time to have followed a dispute between two Albanian families.
The district court convicted a 54-year-old of the crime in 2016, but the defendant appealed against his 18-year sentence.
The murder conviction was upheld by the St Gallen cantonal court on Thursday.
The court described the crime as a ruthless murder and ordered the defendant to pay compensation to the dead man's family.
The fact that the victim had killed the defendant's brother in self defence in 1997 and also injured the defendant at the same time did not alter the facts of the case, the judge said.
The killer and his victim were formerly friends and colleagues.
In December last year a man burst into a Muslim prayer hall in Zurich, shooting and injuring three men.