Goals scored. After that I think it is results against the other side. I don't know if away goals count double in the event of a tie after that.
Is the ref starting to lose the plot a bit? He was fine, but in the last 5 mins seems to be getting things wrong.