The country, which has walked a fine line between Washington and Tehran, is losing its footing as an Arab state trusted by both sides.