Latest: Justice Minister Charlie Flanagan has apologised and said questions over the treatment of whistleblower Sergeant Maurice McCabe could have been handled better.

"Fundamentally, when everything else is peeled away, the essence of this issue is that Sergeant McCabe and his family must have truth and justice," he said.

In a statement to the Dáil, Mr Flanagan said he was considering other reforms that he could introduce to protect gardai who are victims of bullying or harassment to complement whistleblower laws.

"There are stark lessons to be learned here and I intend to take on board these lessons and do my very best to ensure this does not happen again," he said.

The secretary general of the Department of Justice, Noel Waters, who had already told the minister he would be retiring, has brought forward his departure from the job earlier this evening.

Questions have been asked over Mr Flanagan's handling of parliamentary over questions over the treatment of Sergeant McCabe, and when he knew about emails from 2015 which outlined the aggressive legal strategy against the whistleblower.

The Department of Justice also admitted that three emails with information about the approach had not been transferred to the Disclosures Tribunal, headed by Judge Peter Charleton, which is investigating an alleged smear campaign against Mr McCabe.

Sinn Féin's Donnchadh O Laoghaire claimed a criminal offence had been committed by the failure to pass on the documents.

Mr Flanagan defended his actions in recent weeks and claimed that he had been advised that if he engaged in issues that are being examined at the tribunal it would "improperly encroach" on its work.

"I was shocked and, frankly horrified, that there were records in the Department of Justice that should have been provided to the Disclosures Tribunal," he said.

Mr Flanagan said there have been major challenges at every step to obtain complete information in a timely manner.

"The fact is, that in recent days it has been clear that information in the possession of journalists and members of the opposition has not been forthcoming to me as minister," he claimed.

Mr Flanagan set out a timeline of when and what he knew about emails which should have been sent to the tribunal.

On Monday November 13 Mr Waters phoned him in his constituency office in Portlaoise to tell him he was retiring and he referred to an email related to Sergeant McCabe and the 2015 private judge-led inquiry into his allegations of bad policing, the O'Higgins Commission.

Mr Flanagan suggested that he did not ask Mr Waters to explain what was in the email.

"I responded automatically that anything potentially relevant to the tribunal should be immediately conveyed to Judge Charleton," he said.

"I simply missed the significance of the email."

Mr Flanagan said he did not see the email until the following Monday November 20.

He also highlighted his workload.

He said he had received 12,000 emails since he was given the job in the middle of June and about 500 a week as a constituency TD.

Mr Flanagan said 1,829 parliamentary questions have been responded to by his department and he has dealt with 341 formal submissions from senior officials and that he has brought 58 memorandums to cabinet.

The minister paid tribute to Mrs Fitzgerald and said her record tells us more about her than any emails.

"I believe Frances Fitzgerald is a fundamentally good woman and a person of integrity and compassion," he said.

Mr Flanagan said Mrs Fitzgerald may have forgotten emails from 2015 about the aggressive strategy because of the shocking contents of leaked transcripts from the O'Higgins Commission that emerged in 2016.

"That was a failure of memory for which Frances is now paying a very high price," Mr Flanagan said.

"I believe, without question, that she did her very best as minister in very difficult circumstances, and her commitment was, at all times, to making a positive difference to the lives of the people of this country."

RTÉ is reporting that the Department of Justice's Secretary General Noel Waters, who had been due to retire in February, has said he is leaving the role today.

The announcement comes amid widespread criticism of the workings of the Department.

The Minister for Housing Eoghan Murphy has described the Department of Justice as dysfunctional and said more needs to be done.

On RTÉ's Drivetime, he said he finds it difficult that Francis Fitzgerald has resigned, saying she acted appropriately "in all of this".

Minister Murphy said the difficulty was that things were building to such a crescendo that any document found would be seen as damning to Francis Fitzgerald.

He said Minister Charlie Flanagan had to be careful that he wasn't interfering with a tribunal, saying he should be afforded the right to set the record straight in the Dáil this evening.

He said it is impossible to know when there will be a general election.

"[Charlie Flanagan] is taking responsibility in the Dáil this evening to answer questions, but Charlie Flanagan has acted appropriately in this," he said.

"The key thing is to reform the Department of Justice and we need Ministers and government in place to be able to do that work in the public interest," he added.

Update 5.29pm: Her resignation was for the good of the party and the country - former TD

Former Fine Gael TD Monica Barnes has said Frances s Fitzgerald had resigned for the good of the party and had "saved the country from a disastrous election and allowed concentration to remain on Brexit."

Once described by Frances Fitzgerald as her mentor and role model the former FG stalwart said the former Tánaiste had made the right decision in stepping down.

Speaking on RTÉ's Drivetime the former Fine Gael TD went on to say Ms Fitzgerald always acted "out of the very best of reasons" and that she could "make a comeback" in the future.

Earlier:Taoiseach has undermined his authority with handling of Fitzgerald affair

A Fine Gael Councillor in Cork has criticised the Taoiseach for the handling of recent events which led to the resignation of Tánaiste Frances Fitzgerald.

Speaking on RTÉ's Radio 1's Liveline , Councillor John A Collins from Cork said: "There's a question hanging over his head about how he handled the whole situation from day one. I think what he has done has undermined his authority. "

He said Frances Fitzgerald was a "decent politician, a good woman and a good Minister".

"[Mr Varadkar] needs to go back to basics and understand what the people on the ground are thinking within Fine Gael and react more quickly to whats happening amongst the ordinary members.

"There are questions about how FrancesFitzgerald handled it and the way Leo has handled her as well."