The present invention relates to a quinoline derivative of formula (I) or anyone of its pharmaceutically acceptable salt, or anyone of its metabolites, for use for treating or preventing a viral infection, in particular a HIV infection or a HIV-related condition in a patient; and then terminating said treatment when: the viral load is low or undetectable; and/or the level of CD4+ cell count is maintained or restored. The present invention further relates to a quinoline derivative of formula (I) as defined in claim 1, or anyone of its pharmaceutically acceptable salts and metabolites, for use for treating or preventing a viral infection, in particular a HIV infection or a HIV-related condition in a patient, for which an ineffectiveness or a decline in a prior anti-retroviral treatment effectiveness has been stated and to a quinoline derivative of formula (I) as defined above, or anyone of its pharmaceutically acceptable salts and metabolites, for use for treating or preventing a viral infection, in particular a HIV infection or a HIV-related condition in a patient, wherein the patient is infected by a drug-resistant viral strain, and more particularly by a drug-resistant HIV strain.