An air conditioner comprising: a variable speed compressor; a four-way valve; an outdoor heat exchanger; a decompression device; an indoor heat exchanger; an accumulator; a bypass pipe which connects a discharge side (discharge pipe 21a) of the compressor and an outlet of the accumulator and has a tow-way valve in the middle thereof; compressor temperature detecting means for detecting the temperature of the compressor; characterized by a controller which opens the two-way valve and limiting the number of rotations of the compressor to a predetermined value or less on the basis of the temperature detected by the compressor temperature detecting means when the temperature detected by the compressor temperature detecting means is less than or equal to a first determination temperature at the time of the startup of the compressor after the air conditioner is operated, and closes the two-way valve, when the temperature detected by the compressor temperature detecting means is greater than or equal to a second determination temperature, wherein the variable speed compressor, the four-way valve, the outdoor heat exchanger, the decompression device, the indoor heat exchanger, and the accumulator are connected to one another in a ring shape, the controller opens the two-way valve until the temperature of the compressor is greater than or equal to the second determination temperature when the temperature detected by the compressor temperature detecting means is less than a third determination temperature after the two-way valve is closed, and the controller opens the two-way valve until the temperature of the compressor is greater than or equal to the second determination temperature when the amount of reduction in the detected temperature is more than a predetermined value after a predetermined time has elapsed since the closing of the two-way valve. a variable speed compressor; a four-way valve; an outdoor heat exchanger; a decompression device; an indoor heat exchanger; an accumulator; a bypass pipe which connects a discharge side (discharge pipe 21a) of the compressor and an outlet of the accumulator and has a tow-way valve in the middle thereof; compressor temperature detecting means for detecting the temperature of the compressor; a controller which opens the two-way valve and limiting the number of rotations of the compressor to a predetermined value or less on the basis of the temperature detected by the compressor temperature detecting means when the temperature detected by the compressor temperature detecting means is less than or equal to a first determination temperature at the time of the startup of the compressor after the air conditioner is operated, and closes the two-way valve, when the temperature detected by the compressor temperature detecting means is greater than or equal to a second determination temperature, wherein the variable speed compressor, the four-way valve, the outdoor heat exchanger, the decompression device, the indoor heat exchanger, and the accumulator are connected to one another in a ring shape, the controller opens the two-way valve until the temperature of the compressor is greater than or equal to the second determination temperature when the temperature detected by the compressor temperature detecting means is less than a third determination temperature after the two-way valve is closed, and the controller opens the two-way valve until the temperature of the compressor is greater than or equal to the second determination temperature when the amount of reduction in the detected temperature is more than a predetermined value after a predetermined time has elapsed since the closing of the two-way valve.