Secretary of State John Kerry spoke to Ugandan President Yoweri Museveni on Thursday, a day after Kerry likened the nation's anti-gay law to anti-Semitism and apartheid.

In comments to reporters, Kerry criticized the law which increases the penalties for homosexuality in a nation where gay sex is already illegal.

“You could change the focus of this legislation to black or Jewish and you could be in 1930s Germany or you could be in 1950s-1960s apartheid South Africa,” Kerry said. “It was wrong there, egregiously in both places and it is wrong here.”

Kerry called the legislation “flat out morally wrong,” Reuters reported.

The State Department on Friday announced details of a telephone conversation Kerry had with Museveni.

According to the State Department, Kerry expressed to Museveni the United States' deep disappointment in the law's passage, saying that it “complicates” relations between the two nations and threatens the safety and security of Uganda's LGBT community.

Kerry urged Museveni to ensure the safety and protection of all Ugandan citizens.

The two also discussed “the law's negative impact on public health efforts including those to address HIV/AIDS, as well as on tourism and foreign investment in Uganda.”

The State Department did not say how Museveni responded.

(Related: Scott Lively defends Ugandan anti-gay law; says sodomy is not human right.)