The debacle had undermined his confidence in the ministry's ability to carry out its duties.
The extent of the miscommunication within the ministry became apparent yesterday as Mr Allen revealed he knew nothing about the charges against Malaysian diplomat Muhammed Rizalman Bin Ismail until Friday - seven weeks after police arrested him.
Mr McCully did not know Ismail had left the country with diplomatic immunity until this date, when the Herald on Sunday began asking questions about it.
Malaysian officials were also given mixed messages by ministry officials which led them to believe New Zealand agreed to his repatriation in Malaysia.
In official talks between New Zealand and Malaysian representatives, the ministry clearly stated that it wanted Malaysia to waive immunity for Ismail so he could face the charges of burglary and assault with intent to rape in New Zealand.
But mid-level officials also engaged in a series of unofficial discussions - emails and phone calls - which led to this stance becoming more "ambiguous" for Malaysian officials.
As a result, Malaysia concluded that it was acceptable to New Zealand for the diplomat to return home instead of facing the charges in New Zealand, contrary to Mr Key's public statements.
Mr Allen said: "What is clear is that our Malaysian colleagues believed not agreeing to the waiver was a process the New Zealand Government agreed with.
"That was clearly not the case.
"The ministry dropped the ball."
The Herald understands he offered to stand down but Mr McCully said he had confidence in his chief executive.
Mr McCully apologised to Mr Key and the 21-year-old woman who was allegedly assaulted by Ismail.