A United Nations compound in Herat, Afghanistan was attacked Friday with rocket propelled grenades and gunfire, killing an Afghan police guard and wounding other officers, the U.N. said.