HBO has parted ways with Milos Bikovic, a Serbian actor whose casting in the third season of “The White Lotus” had drawn criticism from Ukraine’s foreign ministry for his ties to Russia, according to an HBO spokeswoman.

Bikovic’s role in the dark comedy will be recast, the spokeswoman said.

In a statement provided through a spokesman on Friday, Bikovic said that he was leaving because of external pressure.

“Today, a targeted campaign has been unleashed against me, seemingly as an external maneuver to influence decisions that can create a disturbing precedent shadowing the essence of artistic freedom,” Bikovic said in the statement. “The result of such a narrative is the triumph of absurdity and the defeat of art.”