While there is some level of consensus on a Galactic origin of cosmic rays up to the knee ($E_{k}sim 3times 10^{15}$ eV) and on an extragalactic origin of cosmic rays with energy above $sim 10^{19}$ eV, the debate on the genesis of cosmic rays in the intermediate energy region has received much less attention, mainly because of the ambiguity intrinsic in defining such a region. The energy range between $10^{17}$ eV and $sim 10^{19}$ eV is likely to be the place where the transition from Galactic to extragalactic cosmic rays takes place. Hence the origin of these particles, though being of the highest importance from the physics point of view, it is also one of the most difficult aspects to investigate. Here I will illustrate some ideas concerning the sites of acceleration of these particles and the questions that their investigation may help answer, including the origin of underline{ultra} high energy cosmic rays.