Provided is a novel 1,3,4,8-tetrahydro-2H-pyrido[1,2-a]pyrazine derivative or a pharmaceutically acceptable salt thereof, or a solvate thereof, which is useful as an anti-HIV agent.The present invention provides a compound represented by the following formula [I]wherein each symbol is as defined in the specification, or a pharmaceutically acceptable salt thereof, or a solvate thereof.