Delhi will remain host for the fourth Test between India and South Africa. Hearing the issue for the third day in a row, a two-judge divisional bench of the Delhi High Court asked the Delhi government's excise department to grant a no-objection certificate, thus clearing the final hurdle for the Delhi & Districts Cricket Association (DDCA) to host the match at the Feroz Shah Kotla.

The court also asked the DDCA to furnish a payment of Rs 1 crore (US$ 150,000 approx) to the excise department with the money to be paid in two instalments of Rs 50 lakh each - the first in the next two weeks and the remainder in the subsequent four weeks. The court also set November 27 as the next date of hearing to deal with the overall entertainment tax of Rs 24.46 crore (US$ 3.7 million approx) the DDCA owes the excise department from 2008. The court also asked the government to not take any "coercive" action against the DDCA, which has challenged the calculations of the tax and called it unfair. But that hearing will have no bearing on the Test.

According to Ravinder Manchanda, the DDCA treasurer, the BCCI will release the much-needed grants to organise the match. "We have spoken to Anurag Thakur and he has already told us we will be getting the BCCI grant," Manchanda said. Thakur could not be contacted for confirmation and there was no official release issued by the BCCI.

The court's decision brought to an end a week-long drama that had the DDCA getting involved in a tug of war with the Delhi government and a group of former and current cricketers that had alleged corruption, mismanagement and various wrongdoings by the state's cricket administrators.

The BCCI set a deadline of November 17 for the DDCA to seek all the necessary clearance from the government agencies to host the match, which is scheduled from December 3 to 7. In case the DDCA failed to get things sorted out, the BCCI had finalised Pune as the back-up venue.

Serious doubts over Delhi hosting the match emerged after a three-member panel appointed by the Delhi government, having conducted a fast-track probe in to the running of the DDCA, recommended the association be suspended by the BCCI and a body of professional cricketers run the game in state in the interim.

A combative DDCA then approached the court to seek its intervention to procure the necessary clearances form the various government agencies like the south Delhi Municipal Corporation (SDMC), excise department, fire and safety department, Archaeological Survey of India, Delhi Land and Development Office, and Delhi Urban Arts Commission.

Although the two justices - BR Ahmed and Sanjeev Sachdeva - facilitated the clearances, they made it clear to the DDCA that this was the last time the court would bail out the DDCA. They asked the DDCA to sort out the issues by March 31, 2016.

The first indication that Delhi was likely to stay as the venue came on late Wednesday afternoon when the court appointed former chief justice of Punjab and Haryana High Court Mukul Mudgal as the observer for the Test match. The court said Mudgal could take the help of an "accounts knowing person" if he wanted.

Mudgal's appointment was welcomed by the DDCA, but its administrators would be on the edge considering the court asked him to ensure the state body takes earnest steps to resolve the pending issues relating to clearances from various government agencies.

Nagraj Gollapudi is an assistant editor at ESPNcricinfo