A rotary engine having a housing and a first and second intersecting cavity disposed therein. The rotary engine includes a rotor rotatably mounted in the first cavity, the rotor and the housing defining an annular chamber therebetween, and a piston extending radially from the rotor into the annular chamber. The rotary engine further includes a valve having a combustion chamber rotatably mounted in the second cavity, and a passage formed along a circumference of an inner wall of the second cavity for delivering combustion gases from the combustion chamber to the annular chamber.