This invention relates to certain 6-substituted 2',3'-dideoxypurine nucleosides and pharmaceutically acceptable derivatives thereof and their use in the treatment of human immunodeficiency virus (HIV) and hepatitis B virus (HBV) infections. Also provided are pharmaceutical formulations and processes for the production of the compounds of the invention.