Hackers brought down Malawi's immigration service's computer systems prompting the government to suspend issuance of passports.
President Lazarus Chakwera revealed some details of the attack in an address to MPs during which he described it as a "serious national security breach".
“I am duty bound to inform Malawians that the printing of passports has been suspended because the system at immigration was hacked by digital mercenaries who infiltrated the system,” he said on Wednesday.
He said the hackers had asked for a ransom but that the government would not agree to the demand.
Regain control
The president did not offer details on who the hackers were thought to be but said investigations were ongoing to trace the origin of the attack.
"We are not in the business of appeasing criminals with public money nor are we in the business of negotiating with those who attack our country," Chakwera said.
The government had since initiated measures to boost the cyber security of the immigration department's systems to regain control of the situation, the president added.
Temporary solution
He directed the immigration department to find a temporary solution in three weeks time and resume printing of passports.
Malawi has recently not been issuing passports with local media reports quoting officials as blaming a technical hitch.
➤Click here to follow our WhatsApp channel for more stories.