Perth Glory beat Melbourne City 5-4 to close the A-League regular season but it was not enough to earn a home final against the same opponents.
Glory and City were already destined to meet in an elimination final next week with just the venue to be determined.
It was a tall order for Glory to earn the home final, needing to beat City by four goals.
They did start well with a penalty from Diego Castro in the fifth minute, but City responded in the 21st with a classy finish from Tim Cahill.
An Andy Keogh goal five minutes into the second half reignited Perth's hopes with Chris Harold adding another in the 56th minute.
A Nebojsa Marinkovic free kick with 15 minutes to go put Perth up 4-1, but City snuffed out their chances with Cahill's second in the 80th minute before Nicolas Colazo scored in the 84th.
Adam Taggart's goal for Perth in the 88th minute proved immaterial as did Nick Fitzgerald's in injury time.
That ensured City finished fourth to play at home either on Friday or Sunday against fifth-placed Glory.
Castro was proving particularly lively shaking off a calf injury for Glory. Taggart drew a foul on Neil Kilkenny in the penalty area after four minutes which Castro converted.
City settled when Bruce Kamau found Cahill at the top of the penalty area. After a couple of dribbles he delivered a smooth finish on his left boot.
Another terrific Castro pass put Keogh into some space in the 50th minute and he scored his 12th goal of the season.
Harold replaced Richard Garcia and three minutes later scored with a header from a perfect cross from Josh Risdon to put Perth 3-1 up.
It became 4-1 in the 75th thanks to a masterstroke from coach Kenny Lowe.
Marinkovic was substituted on just as a free kick was awarded. The dead-play specialist delivered a pearler from just outside the box leaving Perth needing just one more goal.
While Perth had the momentum, City delivered the killer blow in the 80th minute when Cahill slid in to give himself a brace for the night and great form heading into the finals.