In his memoir, Eamon Gilmore reveals his tempestuous relationship with Joan Burton, pictured above with Mr Gilmore at a Labour conference in 2011

The tempestuous relationship between Tánaiste Joan Burton and her predecessor, Eamon Gilmore, during their time in Government together is revealed for the first time in the Irish Independent today.

In an explosive new memoir, Mr Gilmore discloses how Ms Burton told him he wasn't becoming European Commissioner and was being dropped from Cabinet during a conversation that lasted two minutes.

After the encounter, he bumped into a senior civil servant and commented: "I have just been court-martialled and I am to be shot at dawn!"

Mr Gilmore also writes of Ms Burton's anger at being offered the Social Protection portfolio in his Cabinet as she wanted to be Foreign Affairs Minister.

"She told me that I was making a big mistake," he writes, in an extract published in today's Irish Independent.

Mr Gilmore's no-holds barred and revealing book, 'Inside The Room - The Untold Story of Ireland's Crisis Government', details how he was "undermined" as leader and ultimately fell foul of forces within the party working against him.

In the book, Mr Gilmore also reveals that Taoiseach Enda Kenny was firmly opposed to the appointment of Máire Whelan as Attorney General, and how he had to battle to have her position agreed.

The publication of the book comes as tensions within Labour are already heightened over the behaviour of Environment Minister Alan Kelly and his botched rent caps plan.

Mr Gilmore says when Ms Burton became leader he was "somewhat surprised" when she said she had not made any decision about his position in Cabinet.

"This led me to wonder if I might be re-appointed as minister, possibly in the same department, as I had seen similar situations occur recently in Germany, Denmark and Luxembourg: a party leader resigning as Deputy Prime Minister but remaining on as a Foreign Minister.

"In any event, I believed that if I were to be sacked as minister, as the outgoing leader, I would at least be afforded the courtesy of some advance notice so that I could make some practical arrangements."

However, Mr Gilmore was told he was out of Cabinet in a brief two-minute meeting with Ms Burton. After the encounter, he met Department of the Taoiseach general secretary Martin Fraser, and told him: "I have just been court- martialled and I am to be shot at dawn!"

Mr Gilmore said when it came to selecting his Cabinet after doing a deal to go into government with Fine Gael he strongly considered not taking a ministerial role himself, and of being Tánaiste without a Cabinet portfolio.

However, he foresaw problems with being "out of the government loop".

He writes of Ms Burton's anger at being offered the Social Protection portfolio in his Cabinet as she expressed an interest in Foreign Affairs, which he ultimately chose for himself.

"Joan didn't see it the same way I did, and reacted very negatively when I told her. She was visibly shocked at the appointment. She asked me about the allocation of the other Labour portfolios and the answer did not quell her growing anger. She told me that I was making a big mistake in appointing her as Minister for Social Protection, that it would go down very badly in the party. I was taken aback by Joan's reaction."

After the disastrous local and European Election results in 2014, he said he realised he was being undermined as leader for some time. He says attacks from within Labour were "more difficult" than opposition criticism.

Irish Independent