Less than three months after the resolution of a particularly messy round of preselections, two unexpected big-name resignations have opened a whole new can of worms for the Western Australian branch of the ALP.

Labor had reason to believe its line-up for the election was essentially confirmed in November, when the national organisation intervened to protect Gillard-Rudd government minister Gary Gray from a challenge in his seat of Brand, and ensure that Canning byelection candidate Matt Keogh got a second bite of the cherry in the newly created seat of Burt, which covers much of the area currently accommodated by Canning.

That’s all changed with the retirement announcements of Melissa Parke three weeks ago and Alannah MacTiernan on Friday afternoon, creating vacancies in their prized seats of Fremantle and Perth.

It’s hard to say which of the two came as the greater surprise, since both clearly came to federal politics with ambitions that had yet to be fulfilled. For this reason, MacTiernan’s announcement was widely seen as presaging a return to state politics, where she had been a star performer as planning and infrastructure minister in the Gallop-Carpenter government.

Polls conducted after the government’s defeat in 2008 found MacTiernan to be the popular choice for the party leadership, but she was effectively vetoed by union leaders whose wrath she had incurred through her actions as a minister.

At the start of 2010, MacTiernan abandoned state politics to take on Liberal incumbent Don Randall in the federal seat of Canning. This seemed a reasonable plan at the time it was hatched, but it proved beyond her powers in the more difficult environment that prevailed at the time of the August 2010 election.

Stephen Smith’s retirement at the 2013 election opened an easier path through the seat of Perth, but by now MacTiernan was in the unhappy position of being a new entrant to federal politics at the age of 60, in a party that had just returned to the political wilderness.

As a factionally independent member of a weak state branch with powerful enemies, MacTiernan found promotion hard to come by, managing only a shadow parliamentary secretary position in March last year.

Parke’s three terms in parliament have likewise delivered her only parliamentary secretary and shadow assistant minister status (apart from a not-quite-three-month stint as international development minister in the dying days of the Rudd government) — presumably less than she had in mind when she abandoned her career as an international lawyer with the United Nations.

The task of replacing Parke and MacTiernan is considerably complicated by affirmative action requirements, owing to party rules dictating that the entire preselection process must start from scratch if the required targets are not met — one of which is that at least 40% of all Labor-held seats must be contested by women. In the context of the coming election, that means at least two out of Perth, Fremantle, Brand and the top two positions on the Senate ticket.

The loss of Parke and MacTiernan leaves only Senator Sue Lines standing, suggesting either Perth or Fremantle will have to go to a woman.

Perth seems the less likely, owing to the broad consensus that MacTiernan should be succeeded by Tim Hammond, a barrister who specialises in representing asbestos disease victims.

Hammond is both a resident of the Perth electorate and the president of one of its ALP branches, and he also wields considerable clout within the party at the national level, as illustrated by his election last year to one of the party’s two national vice-president positions. He also has the endorsement, or something very close to it, of Alannah MacTiernan.

Excluding Perth leaves Fremantle by process of elimination, but the situation there is complicated by the fact that Parke’s retirement announcement came three weeks ago, and the outline of a male-dominated preselection contest was already in place by the time MacTiernan followed suit on Friday.

Of particular interest in the Fremantle preselection contest is the claim being pursued by the Maritime Union of Australia, which has been vigorously developing a membership power base in the WA branch, as well as building alliances with other blue-collar unions.

The MUA’s favoured candidate, union organiser Chris Brown, faces a more conventional opponent in Josh Wilson, who is chief-of-staff to Parke and the deputy mayor of Fremantle.

Wilson has the support of powerful Left faction union United Voice, along with others concerned about the opportunity an MUA-backed candidate would give the Liberals to bang the drum on union militancy.

If affirmative action considerations required Brown and Wilson to stand aside, it’s very far from clear who would emerge in their place.

One idea that has been floated is for the state member for Fremantle, Simone McGurk, to move to the federal seat and leave the state seat for Josh Wilson. However, this would have the fatal drawback of requiring a state byelection in Fremantle — very much like the one that Labor lost to the Greens in 2009.

Another scenario raised in The West Australian yesterday involves Louise Pratt, who lost her Senate seat from the second position on the ticket at the re-run election held in April 2014. Pratt has been relegated to the entirely hopeless number three position for the coming election, but the affirmative action issue could be solved without interference in Perth or Fremantle if she were promoted to number two.

A difficulty here is that the position would have to be gained at the expense of incumbent Glenn Sterle, who has a formidable factional power base of his own through the Transport Workers Union.

If nothing else, one thing stands clear — Bill Shorten will have a lot more to think about than just scoring points off the government when he makes one of his infrequent visits to Perth tomorrow.

*Correction: An earlier version of this article stated that Melissa Parke had never risen higher than shadow assistant minister or parliamentary secretary. She was international development minister for 80 days in 2013.