The present invention discloses compounds or pharmaceutically acceptable salts, esters, or prodrugs thereof, which inhibit RNA-containing virus, particularly the hepatitis C virus (HCV). Consequently, the compounds of the present invention interfere with the life cycle of the hepatitis C virus and are also useful as antiviral agents. The present invention further relates to pharmaceutical compositions comprising the aforementioned compounds for administration to a subject suffering from HCV infection. The invention also relates to methods of treating an HCV infection in a subject by administering a pharmaceutical composition comprising the compounds of the present invention.