The Nairobi Remand and Maximum Security Prison, popularly known as Industrial Area prison, was placed on lockdown on Saturday over the deadly coronavirus.
In a notice to the prison's officers, Officer in Charge Stephen Waithaka said the move was "in respect of the Covid-19 infection, control and prevention measures put in place for the safety and health of all staff members and their families".
He said nobody will be allowed to "enter or leave the road gate at any given time".
Mr Waithaka warned that those who violate the directive will face severe disciplinary measures.
“The non-compliant should immediately be reported to Infection Prevention Control Committee,” he said.
Despite the warning, the announcement resulted in protests by prison officers and their relatives residing within the facility.
The protests only stopped after heavy rains in the evening.
Earlier in March, the Kenya Prisons Service suspended all visits for 30 days to curtail the coronavirus outbreak.
Zeinab Hussein, State Department for Correctional Services Principal Secretary, said the order applied to visits to prison lines, borstal institutions and youth corrective training centres across the country.
She said regular screening and surveillance would be conducted and directed prison commanders to make sure inmates stayed in their blocks and avoided unnecessary movement.
The virus continues to wreak havoc across the world, with at least 24,885 killed and 551,000 infected as at March 27, according to a Reuters tally.
In Kenya, the number of people who have tested positive for the Covid-19 disease has risen to 38, the Ministry of Health announced on Saturday.