This invention relates to novel aminoquinoline derivatives of Formula (I) or Ia or pharmaceutically acceptable salts thereof. This invention also provides compositions comprising a compound of this invention and the use of such compositions in methods of treating diseases and conditions that are beneficially treated by administering an aminoquinoline derivative such as a derivative of primaquine.