I came across the following sentence:
Why are と and まで in that order? Would "別れたいまでと言われた" be incorrect? Is there a rule concerning the order in which particles must be assembled?
Yes, the order matters. Since things before the と will be treated as a part of the quote, お前とはもう別れたいまでと言われた sounds like he actually said "別れたいまで", which makes no sense in this context. It's somewhat like "He even said that ～" vs "He said that even ～". In general, when two particles are combined, the order is almost always important (e.g., you can say 学校では but not 学校はで).