There is essentially nothing to fault in the story Martin McGuinness has told of his Stormont career. His IRA career is another matter, but at Stormont he put that so far behind him that even unionists stopped raising it years ago.

As stated in his resignation letter, McGuinness has fulfilled his role as deputy first minister for 10 years in good faith. In fact, the welfare reform crisis that dominated the last half of his tenure indicates that he tried to make Stormont work while his party’s Dublin leadership acted in bad faith.

McGuinness has challenged republicans and nationalists with his outreach to unionists, only to be frustrated when he felt this was not reciprocated. He will be particularly remembered for his meetings with Queen Elizabeth, which unionist leaders technically reciprocated by meeting the Irish President, in one case on the same occasion. But everyone knows it was McGuinness who made the bigger gesture, even if nobody knows what kind of unionist gesture might have matched it.

Away from symbolism, the DUP has undoubtedly treated McGuinness as a less than equal power-sharing partner, contrary to the requirements not only of the Belfast Agreement but of the St Andrew’s Agreement, which both parties negotiated in 2006 to get their first foray in office off to a solid start.

Sinn Féin rocked that boat first by refusing to turn up to executive meetings for six months, in some long-forgotten huff over policing. But after that initial setback, which unionists simply ignored, there came a relentless DUP pushback on just about every issue imaginable. Quite specific promises made to Sinn Féin at St Andrews, such as an Irish-language act, were put on permanent hold. Even in the midst of his own personal and career crisis in 2010, DUP leader Peter Robinson still managed to complete the devolution of policing and justice – officially the last item of the peace process – on unionism’s terms. From then on, the sidelining of Sinn Féin seemed only to accelerate.

Irrevocably damaged

McGuinness has repeatedly cited Robinson’s cancelling of the Maze peace centre in 2013 as the moment when relationships were irrevocably damaged.

Robinson was in turn responding to a deliberately provocative IRA rally staged by Sinn Féin in Castlederg. However, it would take a brave unionist to play “who started it” in any issue involving parades. Whatever street games both sides were playing in that first tense summer after the flag protests, the Maze centre was a long-term project, painstakingly worked out in Robinson and McGuinness’s office. It had only just commenced when the DUP leader pulled the plug in disrespectfully temperamental fashion, by late-night email from his Florida holiday home.

From this point, Stormont entered three years of permanent crisis, punctuated by annual set-piece negotiations: the Haass talks, the Stormont House Agreement and the Fresh Start agreement.

There was little point expecting rapprochement under such circumstances, but McGuinness could reasonably have hoped that Fresh Start would live up to its name.

Major disputes between both parties had been resolved or parked, the Northern Ireland Executive Committee had been restructured and defeat on welfare reform was probably as much of a relief to Sinn Féin as an embarrassment. Robinson was gone, replaced by Arlene Foster.

Last May’s Assembly election campaign had to be dispensed with first, but the nastiness of that could be discounted as inevitable. The two-party coalition that emerged promised unprecedented stability, as Stormont’s smaller parties stomped off to form its first official opposition. Sinn Féin and the DUP seemed to find this liberating, as if they were finally free to target their real enemies: the UUP and the SDLP.

McGuinness did not even protest when the DUP set about reversing his work 15 years ago as the education minister who abolished academic selection.

As recently as last September, well after the divisive EU referendum, both parties controversially created a new type of senior press officer to manage their collective message, hiring a prominent BBC producer.

“We have a good story to tell of a united Executive team making good on its promises to the electorate,” Foster and McGuinness said.

Embroiled in scandal

A month later, their joint office was embroiled in a scandal over the funding of paramilitary-linked groups. Although the coverage focused on loyalists, Sinn Féin and the DUP could not be prised apart.

The same instinct was evident when the Renewable Heat Incentive (RHI) crisis finally exploded. Sinn Féin made sincere efforts for weeks, at risk to its own credibility, to avoid bringing the Executive down.

It is clear from McGuinness’s letter, not to mention from observation, that Foster’s personal conduct tipped things over the edge. He accuses her of refusing to “exhibit any humility”, a failing that extends well beyond the £490 million (€565 million) RHI affair. Under pressure from the anger of Sinn Féin’s own constituents, McGuinness has had no choice but to pull the plug.

He says he has done so with deep regret and reluctance, and that is entirely believable. The legacy of his life in politics appears to be proving that unionists cannot be soft-soaped, even by a former hard man.

McGuinness may be leaving office with his dignity intact, and many in Sinn Féin will relish the firmer line to come, but his departure still represents failure for all sides in Northern Ireland.

Once again, unionists are about to be taught the lesson they never learn: deal with nationalism now, or get a worse deal later.