Singapore on Thursday sentenced two German men to three strokes of the cane and nine months in prison after they were found guilty of vandalizing a public train carriage.

The attorney-general's office identified the two men as 22-year-old Andreas Von Knorre and 21-year-old Elton Hinz.

They entered a Singapore train depot at night in November and sprayed paint on a train that was parked there, according to The Straits Times and other media reports.

The duo then left Singapore, were later spotted by police in Bangkok, and eventually were arrested in Kuala Lumpur, Malaysia, and extradited back to Singapore, the reports said.

They have been in jail since November, and their sentence will be backdated until then.