The present invention relates to compounds of Formula I, II or Ill, or a pharmaceutically acceptable salt, ester, or prodrug, thereof:wherein W is a substituted or unsubstituted heterocyclic ring system. The compounds inhibit serine protease activity, particularly the activity of hepatitis c virus (HCV) NS3-NS4A protease. 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.