Hungary’s state opera company has defended itself against charges of racism after it staged Porgy and Bess with a largely white cast in open defiance of the wishes of its composers, the Gershwin brothers.

George and Ira Gershwin’s emblematic 1935 work was a period dramatisation of the grinding poverty of African-American life in the racially segregated US south. It became famed for songs such as Summertime and It Ain’t Necessarily So and was expressly intended by the creators to be the preserve of black performers.

Their desire was later incorporated into copyright rules governed by the agents for the brothers’ estate, Tams-Witmark in New York.

But directors of the Hungarian state opera attacked the stipulation as “racist” and “politically incorrect” after staging four sell-out productions in Budapest that featured mainly white performers and changed the setting from a poor black community in 1920s South Carolina to a refugee centre in contemporary Europe.

The opera company was forced to declare on publicity material that its production was “unauthorised [and] contrary to the requirements for the presentation of the work”.

Accusations of a political agenda have further complicated the wrangle, with some critics seeing the staging of the work as an attempt to stir controversy, benefiting prime minister Viktor Orbán’s rightwing Fidesz government in the run-up to a general election in April.

Orbán – who is in open dispute with the EU over its migrant quota scheme and regularly portrays himself as a defender of Europe’s “Christian values” – is no stranger to racial controversy. He drew criticism last year for saying that “ethnic homogeneity” was vital for economic success and that “too much mixing causes trouble”.

Setting the opera in a migrant centre has prompted comparisons with events at Budapest’s Keleti railway station in 2015, when refugees from Syria and elsewhere entered Hungary and gathered to board trains bound for Germany and other countries.

In an email to the Observer, Szilveszter Ókovács, Hungarian state opera’s general director, denied that the production was inspired by the railway station scenes and likened suggestions of a pro-Orbán agenda to “a disease”, saying the prime minister had not seen the show.

In a country where virtually no black people live, as we had no colonies, this stipulation [cannot] be explained Szilveszter Ókovács, Hungarian state opera’s general director

He defended the company’s right to cast white performers and questioned the authenticity of the Gershwins’ rule. “The stipulation is racist and politically incorrect,” Ókovács said. “In a country where virtually no black people live, as we had no colonies, this stipulation [cannot] be explained. I must express a strong doubt regarding the stipulation in the will. If anyone has not made such a decision in life, why would they do it after their death?”

In fact, George Gershwin refused a lucrative offer from New York’s Metropolitan Opera to perform the work because it would have involved white actors with blacked-up faces. He spurned a chance to work with Al Jolson on similar grounds. Although there have been several productions featuring white actors with blacked-up faces in Europe, all were faithful to the original racial context.Ókovács said the company had tried to change the minds of Tams-Witmark’s representatives when it began negotiations to stage the opera. He claimed there was no mention of the black cast rule on the resulting contract, leading him to believe the company was free to cast at will. But later Tams-Witmark objected.

“I am amazed that they do not get it on the other side of the ocean,” Ókovács said. “Would it be possible for America not to understand you cannot make such distinctions between man and man? In Hungary, it has occurred only once: artists of the opera were banned from appearing on stage, and all this led to the Holocaust.”

Tams-Witmark did not respond to requests for information.

But Ádám Fischer, a prominent Hungarian conductor who resigned as the state opera’s music director in 2010 in protest at the Orbán government’s policies, called the adaptation “a political production”, which had not been made in good faith.

“They wanted to provoke this discussion,” he said. “It’s part of the whole election campaign against what they see as the double standards of the west and to allow them to say the west is racist and we are better than the west. Why else would Hungarian state opera stage a production of Porgy and Bess two months before the election?”