The regulations state that applicants for the K3 and K4 visas must apply for those visas at the U.S. Embassy or Consulate in the country where the marriage to the US citizen took place. However, there are 2 exceptions to this rule:
1) If the marriage took place in the US, then the visa application must take place abroad in the country where the visa applicant resides.
2) If the marriage took place in a country where there is no US consular section providing nonimmigrant visa services, then the application for a visa shall take place in the country designated by the Department of State for immigrant visa processing for residents of the country where the the wedding took place.