In the last few months, Riyadh has turned away from US-aligned partners in the Middle East.