The present invention relates to compounds of the formula (I),or pharmaceutically acceptable salts, enantiomer or diastereomer thereof, wherein R1 to R5 are as described above. The compounds may be useful for the treatment or prophylaxis of hepatitis B virus infection.