TEGUCIGALPA, Honduras — President Juan Orlando Hernández has tested positive for the coronavirus, but says he is suffering only mild symptoms and would continue in his job.

“Because of my work, I haven’t been able to stay at home 100 percent,” Hernández said in a televised appearance late Tuesday, explaining how he might have contracted the virus. “Now I will do my work through virtual media, through telework.”

He said doctors had advised him to rest and that he would continue to be medically evaluated. He planned to isolate himself but continue running the government, he said in a statement.

Hernández is just over two years into his second term as president. His government imposed a strict nationwide curfew in mid-March to limit the spread of covid-19; it started reopening the battered economy a week ago.

The Central American nation of 9 million has reported 9,656 cases of coronavirus and 330 deaths, according to a database maintained by Johns Hopkins University.

The president said his wife, Ana García, and two of his aides have also tested positive for the virus.

Hernández has been a deeply controversial president. He won a second term in a 2017 election that was criticized for being plagued with irregularities. He was the target of widespread protests last year led by teachers and doctors angered by planned cuts in government funding.

He has also been accused of ties to drug gangs. Hernández’s brother, Juan Antonio “Tony” Hernández, a former Honduran congressman, was convicted in U.S. court last year of trafficking cocaine. During that trial, U.S. prosecutors alleged that the president took a $1 million bribe in 2013 from Mexican drug lord Joaquín “El Chapo” Guzmán.

In April, U.S. prosecutors alleged that former national police chief Juan Carlos Bonilla coordinated the shipment of tons of cocaine on behalf of Hernández and his brother.

The president has denied the accusations. He says they came from untrustworthy informants and he has fought drug cartels.

Hernández has retained close ties with the Trump administration, which has valued his cooperation in cracking down on unauthorized migration. Honduras passed legislation last month that allows greater cooperation with the United States against drug trafficking, focusing on deterring private jets that transport cocaine from Venezuela to the Central American country.

The president of neighboring Guatemala expressed support for Hernández Wednesday.

“I stand in solidarity with the President of Honduras … and the first lady,” Guatemalan President Alejandro Giammattei tweeted. “I lift up my prayers for your speedy recovery and express to you my consideration, respect and esteem.”

Hernández is at least the second head of government worldwide to be infected by the coronavirus. British Prime Mininster Boris Johnson was diagnosed with covid-19 in March and treated in intensive care in May. He has since recovered.

Sheridan reported from Mexico City.